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

Error when evaluating SSR module /src/routes/__layout.svelte #3742

Closed
MarcGodard opened this issue Feb 5, 2022 · 10 comments
Closed

Error when evaluating SSR module /src/routes/__layout.svelte #3742

MarcGodard opened this issue Feb 5, 2022 · 10 comments
Labels

Comments

@MarcGodard
Copy link

Describe the bug

New error showing up 99% of the time now, and no idea what causes it to work once and a while.

package.json is there....

marcgodard@pop-os:~/Documents/GitHub/gs-web$ npm run dev

> [email protected] dev
> svelte-kit dev

Pre-bundling dependencies:
  svelte
  svelte/store
  svelte-intl-precompile
  svelte/transition
  @feathersjs/client
  (...and 15 more)
(this will be run only when your dependencies or config have changed)

  SvelteKit v1.0.0-next.260

  local:   http://localhost:3000
  network: not exposed

  Use --host to expose server to other devices on this network


4:31:00 PM [vite] Error when evaluating SSR module /src/routes/__layout.svelte:
Error: Cannot find module '/home/marcgodard/Documents/GitHub/gs-web/package.json' imported from '/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js'
    at viteResolve (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:60126:25)
    at Function._resolveFilename (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:60140:28)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.search (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:12705:33)
    at async resolvePostcssConfig (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:20506:22)
    at async compileCSS (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:20329:27)
    at async TransformContext.transform (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:20015:50)
    at async Object.transform (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:36985:30)
Cannot find module '/home/marcgodard/Documents/GitHub/gs-web/package.json' imported from '/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js'
Error: Cannot find module '/home/marcgodard/Documents/GitHub/gs-web/package.json' imported from '/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js'
    at viteResolve (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:60126:25)
    at Function._resolveFilename (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:60140:28)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.search (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:12705:33)
    at async resolvePostcssConfig (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:20506:22)
    at async compileCSS (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:20329:27)
    at async TransformContext.transform (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:20015:50)
    at async Object.transform (/home/marcgodard/Documents/GitHub/gs-web/node_modules/vite/dist/node/chunks/dep-f5552faa.js:36985:30)
[svelte-preprocess] PostCSS configuration was not passed or is invalid. If you expect to load it from a file make sure to install "postcss-load-config" and try again.

Error: Cannot find module '/home/marcgodard/Documents/GitHub/gs-web/package.json' imported from '/home/marcgodard/Documents/GitHub/gs-web/node_modules/lilconfig/dist/index.js'

Reproduction

Unknown.

Logs

No response

System Info

System:
    OS: Linux 5.15 Pop!_OS 21.10
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
    Memory: 3.94 GB / 15.36 GB
    Container: Yes
    Shell: 5.1.8 - /bin/bash
  Binaries:
    Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
  Browsers:
    Brave Browser: 98.1.35.100
    Firefox: 96.0
  npmPackages:
    @sveltejs/kit: ^1.0.0-next.196 => 1.0.0-next.260 
    svelte: ^3.44.2 => 3.46.4

Severity

blocking all usage of SvelteKit

Additional Information

No response

@benmccann benmccann added the vite label Feb 6, 2022
@benmccann
Copy link
Member

Vite 2.8 is coming out next week. Hopefully it will fix it. You could try a beta in the meantime

@uc-anr
Copy link

uc-anr commented Feb 6, 2022

How can i use the beta as i am unable to run my server ?

@uc-anr
Copy link

uc-anr commented Feb 6, 2022

Any update on solution @Conduitry

@uc-anr
Copy link

uc-anr commented Feb 6, 2022

It is little urgent as my production is down.

@MarcGodard
Copy link
Author

I just noticed that when I turn on my graphics card, I don't get this error.

@benmccann
Copy link
Member

Please don't ping specific maintainers

You can try the beta with pnpm overrides

There's no way graphics card has anything to do with this. Rather it just happens sometimes and that's a spurious correlation

@bluwy
Copy link
Member

bluwy commented Feb 7, 2022

See #3118 (comment) to use overrides to fix this. The issue is fixed in Vite 2.8 beta, a stable 2.8 version will be released soon this week.

@uc-anr
Copy link

uc-anr commented Feb 7, 2022

See #3118 (comment) to use overrides to fix this. The issue is fixed in Vite 2.8 beta, a stable 2.8 version will be released soon this week.

How would you do this in your package.json?

@uc-anr
Copy link

uc-anr commented Feb 7, 2022

Please don't ping specific maintainers

You can try the beta with pnpm overrides

There's no way graphics card has anything to do with this. Rather it just happens sometimes and that's a spurious correlation

How would you do this in your package.json?

@MarcGodard
Copy link
Author

I just think it is a race condition and having my graphic card on makes the system run faster. I did a package update and it has completely disappeared now.

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

No branches or pull requests

4 participants