navneetsharmaui / sveltekit-starter

Sveltekit starter project created with sveltekit, typescript, tailwindcss, postcss, husky, and storybook. The project has the structure set up for the scaleable web application.
https://sveltekit-starter-one.vercel.app
MIT License
609 stars 100 forks source link

[vite-plugin-svelte] ENOENT: no such file or directory, open 'node:http/package.json' #35

Closed IsaacHub closed 2 years ago

IsaacHub commented 2 years ago

Describe the bug I upgraded all the packages in package.json using https://www.npmjs.com/package/npm-check-updates , and then when I executed command npm run build , it throws this error: ENOENT: no such file or directory, open 'node:http/package.json'

npm run dev is working fine.

To Reproduce Steps to reproduce the behavior:

  1. npm install
  2. npm install -g npm-check-updates
  3. ncu
  4. ncu -u
  5. change pages to entries in svelte.config.js on object kit.prerender
  6. npm run build
[vite-plugin-svelte] ENOENT: no such file or directory, open 'node:http/package.json'
> ENOENT: no such file or directory, open 'node:http/package.json'
Error: ENOENT: no such file or directory, open 'node:http/package.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at resolveViaPackageJsonSvelte (file:///E:/projects/Newfolder/sveltekit-starter-main/node_modules/@sveltejs/vite-plugin-svelte/dist/index.js:1094:40)
    at Object.resolveId (file:///E:/projects/Newfolder/sveltekit-starter-main/node_modules/@sveltejs/vite-plugin-svelte/dist/index.js:1424:26)
    at Object.<anonymous> (E:\projects\Newfolder\sveltekit-starter-main\node_modules\vite\dist\node\chunks\dep-e0fe87f8.js:43315:19)
    at E:\projects\Newfolder\sveltekit-starter-main\node_modules\rollup\dist\shared\rollup.js:22706:25
node:events:368
      throw er; // Unhandled 'error' event
      ^

Error: spawn svelte-kit ENOENT
    at notFoundError (E:\projects\Newfolder\sveltekit-starter-main\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:6:26)
    at verifyENOENT (E:\projects\Newfolder\sveltekit-starter-main\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:40:16)
    at ChildProcess.cp.emit (E:\projects\Newfolder\sveltekit-starter-main\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:27:25)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess.cp.emit (E:\projects\Newfolder\sveltekit-starter-main\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:30:37)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) {
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn svelte-kit',
  path: 'svelte-kit',
  spawnargs: [ 'build' ]
}
ERROR: "build:sveltekit" exited with 1.

System info:

  System:
    OS: Windows 10 10.0.19043
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
    Memory: 3.25 GB / 15.91 GB
  Binaries:
    Node: 16.12.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.1.1 - C:\Program Files\nodejs\npm.CMD
  npmPackages:
    @sveltejs/adapter-netlify: 1.0.0-next.35
    @sveltejs/adapter-node: 1.0.0-next.55
    @sveltejs/adapter-static: 1.0.0-next.21
    @sveltejs/adapter-vercel: 1.0.0-next.31
    @sveltejs/kit: 1.0.0-next.201
    svelte: 3.44.2
github-actions[bot] commented 2 years ago

Stale issue message