Cannot find module `...@nuxt/devtools`

Hi there. I just installed a fresh new project with nuxi init. I wanted to npm i, but it returns the following error:
[9:43:38 AM] ERROR Error while requiring module /Users/fabian/.nvm/versions/node/v16.18.1/lib/node_modules/@nuxt/devtools/module.cjs: Error: Cannot find module '/Users/fabian/.nvm/versions/node/v16.18.1/lib/node_modules/@nuxt/devtools/module.cjs'
Require stack:
- /Users/fabian/Desktop/code/urzinger-website/index.js


[9:43:38 AM] ERROR Cannot find module '/Users/fabian/.nvm/versions/node/v16.18.1/lib/node_modules/@nuxt/devtools/module.cjs'
Require stack:
- /Users/fabian/Desktop/code/urzinger-website/index.js

Require stack:
- index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Function.resolve (node:internal/modules/cjs/helpers:116:19)
at Function._resolve [as resolve] (node_modules/.pnpm/[email protected]/node_modules/jiti/dist/jiti.js:1:250100)
at resolveModule (node_modules/.pnpm/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2230:29)
at requireModule (node_modules/.pnpm/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2240:24)
at loadNuxtModuleInstance (node_modules/.pnpm/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2435:90)
at async installModule (node_modules/.pnpm/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2408:47)
at async initNuxt (node_modules/.pnpm/[email protected]_@[email protected]/node_modules/nuxt/dist/index.mjs:3231:7)
at async loadNuxt (node_modules/.pnpm/[email protected]_@[email protected]/node_modules/nuxt/dist/index.mjs:3304:5)
at async loadNuxt (node_modules/.pnpm/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2537:19)
[9:43:38 AM] ERROR Error while requiring module /Users/fabian/.nvm/versions/node/v16.18.1/lib/node_modules/@nuxt/devtools/module.cjs: Error: Cannot find module '/Users/fabian/.nvm/versions/node/v16.18.1/lib/node_modules/@nuxt/devtools/module.cjs'
Require stack:
- /Users/fabian/Desktop/code/urzinger-website/index.js


[9:43:38 AM] ERROR Cannot find module '/Users/fabian/.nvm/versions/node/v16.18.1/lib/node_modules/@nuxt/devtools/module.cjs'
Require stack:
- /Users/fabian/Desktop/code/urzinger-website/index.js

Require stack:
- index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Function.resolve (node:internal/modules/cjs/helpers:116:19)
at Function._resolve [as resolve] (node_modules/.pnpm/[email protected]/node_modules/jiti/dist/jiti.js:1:250100)
at resolveModule (node_modules/.pnpm/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2230:29)
at requireModule (node_modules/.pnpm/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2240:24)
at loadNuxtModuleInstance (node_modules/.pnpm/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2435:90)
at async installModule (node_modules/.pnpm/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2408:47)
at async initNuxt (node_modules/.pnpm/[email protected]_@[email protected]/node_modules/nuxt/dist/index.mjs:3231:7)
at async loadNuxt (node_modules/.pnpm/[email protected]_@[email protected]/node_modules/nuxt/dist/index.mjs:3304:5)
at async loadNuxt (node_modules/.pnpm/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2537:19)
The problem is, I do not even have installed node 16. I only have node 18.16.1. So why does nuxt require a path with a node version I don't have installed? I used node 16 before, but this was a long time ago. I tried to remove and reinstall nvm, node, pnpm from my system, but that didn't help.
2 Replies
Fabian B.
Fabian B.OP2y ago
npx nuxi info
- Operating System: Darwin
- Node Version: v18.16.1
- Nuxt Version: 3.6.2
- Nitro Version: 2.5.2
- Package Manager: [email protected]
- Builder: vite
- User Config: devtools
- Runtime Modules: -
- Build Modules: -
- Operating System: Darwin
- Node Version: v18.16.1
- Nuxt Version: 3.6.2
- Nitro Version: 2.5.2
- Package Manager: [email protected]
- Builder: vite
- User Config: devtools
- Runtime Modules: -
- Build Modules: -
Just tried it out with other older nuxt projects I have. Same issue. So it seems to be that somewhere in my system, this old node 16 is still there and somehow @nuxt/devtools is being tried to load from there. Maybe someone knows how to resolve this 😄 thanks in advance!
Fabian B.
Fabian B.OP2y ago
GitHub
Error running the project · Issue #50 · nuxt/devtools
I have enabled devtools for the project running Nuxt 3.2.0 and whenever I run nuxi dev I get the following output: Nuxt 3.2.0 with Nitro 2.2.1 13:05:40 13:05:41 > Local: http://localhost:3000/ &...
Want results from more Discord servers?
Add your server