Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error when run dev #13019

Open
LRoffic opened this issue Nov 17, 2024 · 5 comments
Open

Strange error when run dev #13019

LRoffic opened this issue Nov 17, 2024 · 5 comments

Comments

@LRoffic
Copy link

LRoffic commented Nov 17, 2024

Describe the bug

I meet a problem when i launch my dev mode. I've tried with npm and yarn but both gave me this error

I've tried to rollback my code, rollback my packages, but problem is still present...

Reproduction

I don't really know how to reproduce... i just launch npm run dev and when is fully loaded i go to my localhost:5173 then error appear...

Logs

PS C:\wamp64\www\blog> npm run dev

> [email protected] dev
> vite dev

15:29:10 [vite-plugin-svelte] WARNING: The following packages have a svelte field in their package.json but no exports condition for svelte.

[email protected]
[email protected]

Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition for details.

  VITE v5.4.11  ready in 26774 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help

SvelteKitError: Not found: /@id/__x00__virtual:__sveltekit/paths
    at resolve (C:\wamp64\www\blog\node_modules\@sveltejs\kit\src\runtime\server\respond.js:530:13)
    at resolve (C:\wamp64\www\blog\node_modules\@sveltejs\kit\src\runtime\server\respond.js:330:5)
    at passedHandle (file:///C:/wamp64/www/blog/node_modules/svelte-kit-cookie-session/handle.js:2:85)
    at Object.handle (file:///C:/wamp64/www/blog/node_modules/svelte-kit-cookie-session/handle.js:7:32)
    at async Module.respond (C:\wamp64\www\blog\node_modules\@sveltejs\kit\src\runtime\server\respond.js:327:20)
    at async file:///C:/wamp64/www/blog/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:524:22 {
  status: 404,
  text: 'Not Found'
}
SvelteKitError: Not found: /@id/__x00__virtual:__sveltekit/environment
    at resolve (C:\wamp64\www\blog\node_modules\@sveltejs\kit\src\runtime\server\respond.js:530:13)
    at resolve (C:\wamp64\www\blog\node_modules\@sveltejs\kit\src\runtime\server\respond.js:330:5)
    at passedHandle (file:///C:/wamp64/www/blog/node_modules/svelte-kit-cookie-session/handle.js:2:85)
    at Object.handle (file:///C:/wamp64/www/blog/node_modules/svelte-kit-cookie-session/handle.js:7:32)
    at async Module.respond (C:\wamp64\www\blog\node_modules\@sveltejs\kit\src\runtime\server\respond.js:327:20)
    at async file:///C:/wamp64/www/blog/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:524:22 {
  status: 404,
  text: 'Not Found'
}

System Info

npx envinfo --system --binaries --browsers --npmPackages "{svelte,@sveltejs/*,vite}"
(node:61744) ExperimentalWarning: CommonJS module C:\Users\lee-r\AppData\Roaming\npm\node_modules\npm\node_modules\debug\src\node.js is loading ES Module C:\Users\lee-r\AppData\Roaming\npm\node_modules\npm\node_modules\supports-color\index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

  System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
    Memory: 12.27 GB / 29.94 GB
  Binaries:
    Node: 23.2.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.15)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @sveltejs/adapter-node: ^5.2.9 => 5.2.9
    @sveltejs/enhanced-img: ^0.4.1 => 0.4.1
    @sveltejs/kit: ^2.8.1 => 2.8.1
    @sveltejs/vite-plugin-svelte: ^4.0.1 => 4.0.1
    svelte: ^5.2.2 => 5.2.2
    vite: ^5.4.11 => 5.4.11

Severity

blocking all usage of SvelteKit

Additional Information

No response

@Conduitry
Copy link
Member

We need a reproduction, or there's nothing we can investigate.

@LRoffic
Copy link
Author

LRoffic commented Nov 18, 2024

Ok... I try to find a solution, but i don't know how is it appear... My dev mode worked (and restarted one time before closed) and the next day, without any manipulation from me, got this error...

I don't really know how i can give you reproduction instructions... If you have any ideas ??
Otherwise, i try to upload my code on github, but i don't know if is it usefull

@LRoffic
Copy link
Author

LRoffic commented Nov 18, 2024

I uploaded my code : https://github.com/LRoffic/Sveltekit-errors

@eltigerchino
Copy link
Member

I could not reproduce the issue using the given repository. Please upload a minimal reproduction. These are the errors logs I get when I run the development server:

3:18:47 PM [vite] Error when evaluating SSR module /src/lib/server/controllers/initDB.js:
|- Error: Dialect needs to be explicitly supplied as of v4.0.0
    at new Sequelize (/home/chewteeming/github/Sveltekit-errors/node_modules/.pnpm/[email protected][email protected]/node_modules/sequelize/lib/sequelize.js:136:13)
    at /home/chewteeming/github/Sveltekit-errors/src/lib/server/controllers/initDB.js:9:17
    at async instantiateModule (file:///home/chewteeming/github/Sveltekit-errors/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52972:5)

3:18:47 PM [vite] Error when evaluating SSR module /src/lib/server/controllers/ArticleController.js:
|- Error: Dialect needs to be explicitly supplied as of v4.0.0
    at new Sequelize (/home/chewteeming/github/Sveltekit-errors/node_modules/.pnpm/[email protected][email protected]/node_modules/sequelize/lib/sequelize.js:136:13)
    at /home/chewteeming/github/Sveltekit-errors/src/lib/server/controllers/initDB.js:9:17
    at async instantiateModule (file:///home/chewteeming/github/Sveltekit-errors/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52972:5)

3:18:47 PM [vite] Error when evaluating SSR module /src/routes/+page.server.js:
|- Error: Dialect needs to be explicitly supplied as of v4.0.0
    at new Sequelize (/home/chewteeming/github/Sveltekit-errors/node_modules/.pnpm/[email protected][email protected]/node_modules/sequelize/lib/sequelize.js:136:13)
    at /home/chewteeming/github/Sveltekit-errors/src/lib/server/controllers/initDB.js:9:17
    at async instantiateModule (file:///home/chewteeming/github/Sveltekit-errors/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52972:5)

Error: Dialect needs to be explicitly supplied as of v4.0.0
    at new Sequelize (/home/chewteeming/github/Sveltekit-errors/node_modules/.pnpm/[email protected][email protected]/node_modules/sequelize/lib/sequelize.js:136:13)
    at /home/chewteeming/github/Sveltekit-errors/src/lib/server/controllers/initDB.js:9:17
    at async instantiateModule (file:///home/chewteeming/github/Sveltekit-errors/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52972:5)
Error: Dialect needs to be explicitly supplied as of v4.0.0
    at new Sequelize (/home/chewteeming/github/Sveltekit-errors/node_modules/.pnpm/[email protected][email protected]/node_modules/sequelize/lib/sequelize.js:136:13)
    at /home/chewteeming/github/Sveltekit-errors/src/lib/server/controllers/initDB.js:9:17
    at async instantiateModule (file:///home/chewteeming/github/Sveltekit-errors/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52972:5)

@LRoffic
Copy link
Author

LRoffic commented Nov 18, 2024

Did you config the database ?

To install database use the database.sql, then go on src/lib/server/config/ and edit db_config.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants