I run
npm run dev
error:
ERROR Cannot start nuxt: Cannot find module 'C:/Program Files/nodejs/node_modules/@nuxt/devtools/module.cjs'
Require stack:
- P:\random\project-directory\index.js
Require stack:
- index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1090:15)
at Function.resolve (node:internal/modules/helpers:125:19)
at Function._resolve [as resolve] (node_modules\.pnpm\jiti@1.18.2\node_modules\jiti\dist\jiti.js:1:241025)
at resolveModule (/P:/random/project-directory/node_modules/.pnpm/@nuxt+kit@3.3.3/node_modules/@nuxt/kit/dist/index.mjs:260:29)
at normalizeModule (/P:/random/project-directory/node_modules/.pnpm/@nuxt+kit@3.3.3/node_modules/@nuxt/kit/dist/index.mjs:469:18)
at installModule (/P:/random/project-directory/node_modules/.pnpm/@nuxt+kit@3.3.3/node_modules/@nuxt/kit/dist/index.mjs:451:47)
at initNuxt (/P:/random/project-directory/node_modules/.pnpm/nuxt@3.3.3_eslint@8.34.0_typescript@4.9.5/node_modules/nuxt/dist/index.mjs:2477:13)
at async load (/P:/random/project-directory/node_modules/.pnpm/nuxi@3.3.3/node_modules/nuxi/dist/chunks/dev.mjs:6824:9)
at async Object.invoke (/P:/random/project-directory/node_modules/.pnpm/nuxi@3.3.3/node_modules/nuxi/dist/chunks/dev.mjs:6874:5)
at async _main (/P:/random/project-directory/node_modules/.pnpm/nuxi@3.3.3/node_modules/nuxi/dist/cli.mjs:49:20)
Nuxt version: 3.3.3 Node version: 19 (Also tried other versions)
I got it fixed by:
npm i -g @nuxt/devtools