When I run npm create svelte@latest
app in my folder I am getting this error.
node:internal/errors:490 ErrorCaptureStackTrace(err); ^Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\PC\AppData\Local\npm-cache\_npx\50a6160ffc29bafc\node_modules\create-svelte\index.js' imported from C:\Users\PC\AppData\Local\npm-cache\_npx\50a6160ffc29bafc\node_modules\create-svelte\bin.js at new NodeError (node:internal/errors:399:5) at finalizeResolution (node:internal/modules/esm/resolve:326:11) at moduleResolve (node:internal/modules/esm/resolve:945:10) at defaultResolve (node:internal/modules/esm/resolve:1153:11) at nextResolve (node:internal/modules/esm/loader:163:28) at ESMLoader.resolve (node:internal/modules/esm/loader:838:30) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18) at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40) at link (node:internal/modules/esm/module_job:76:36) { code: 'ERR_MODULE_NOT_FOUND'}Node.js v18.16.0npm ERR! code 1npm ERR! path C:\Users\PC\Documents\Project Eduardsnpm ERR! command failednpm ERR! command C:\Windows\system32\cmd.exe /d /s /c create-svelte appnpm ERR! A complete log of this run can be found in:npm ERR! C:\Users\PC\AppData\Local\npm-cache\_logs\2023-05-07T04_43_14_156Z-debug-0.log
The log looks like this
0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js1 info using npm@9.5.12 info using node@v18.16.03 timing npm:load:whichnode Completed in 2ms4 timing config:load:defaults Completed in 1ms5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms6 timing config:load:builtin Completed in 2ms7 timing config:load:cli Completed in 3ms8 timing config:load:env Completed in 0ms9 timing config:load:file:C:\Users\PC\Documents\Project Eduards\.npmrc Completed in 0ms10 timing config:load:project Completed in 3ms11 timing config:load:file:C:\Users\PC\.npmrc Completed in 0ms12 timing config:load:user Completed in 1ms13 timing config:load:file:C:\Users\PC\AppData\Roaming\npm\etc\npmrc Completed in 0ms14 timing config:load:global Completed in 0ms15 timing config:load:setEnvs Completed in 1ms16 timing config:load Completed in 12ms17 timing npm:load:configload Completed in 14ms18 timing npm:load:mkdirpcache Completed in 0ms19 timing npm:load:mkdirplogs Completed in 1ms20 verbose title npm create svelte@latest app21 verbose argv "create" "svelte@latest" "app"22 timing npm:load:setTitle Completed in 1ms23 timing config:load:flatten Completed in 4ms24 timing npm:load:display Completed in 8ms25 verbose logfile logs-max:10 dir:C:\Users\PC\AppData\Local\npm-cache\_logs\2023-05-07T04_43_14_156Z-26 verbose logfile C:\Users\PC\AppData\Local\npm-cache\_logs\2023-05-07T04_43_14_156Z-debug-0.log27 timing npm:load:logFile Completed in 6ms28 timing npm:load:timers Completed in 1ms29 timing npm:load:configScope Completed in 0ms30 timing npm:load Completed in 33ms31 silly logfile start cleaning logs, removing 2 files32 timing arborist:ctor Completed in 1ms33 silly logfile done cleaning log files34 http fetch GET 200 https://registry.npmjs.org/create-svelte 1229ms (cache revalidated)35 timing arborist:ctor Completed in 0ms36 timing arborist:ctor Completed in 0ms37 timing command:create Completed in 1577ms38 verbose stack Error: command failed38 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:53:27)38 verbose stack at ChildProcess.emit (node:events:513:28)38 verbose stack at maybeClose (node:internal/child_process:1091:16)38 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)39 verbose cwd C:\Users\PC\Documents\Project Eduards40 verbose Windows_NT 10.0.1836341 verbose node v18.16.042 verbose npm v9.5.143 error code 144 error path C:\Users\PC\Documents\Project Eduards45 error command failed46 error command C:\Windows\system32\cmd.exe /d /s /c create-svelte app47 verbose exit 148 timing npm Completed in 1674ms49 verbose code 150 error A complete log of this run can be found in:50 error C:\Users\PC\AppData\Local\npm-cache\_logs\2023-05-07T04_43_14_156Z-debug-0.log
I tried reinstalling nodejs and restarting my pc but that did not work.