Node can not find module. Please Help
Details
Hi. I use next.js/ When I want run project it gives me error. Here is error:
PS C:\Users\User\Desktop\TS & Next\typenext> npm run dev
> [email protected] dev
> next dev
"Next\typenext\node_modules\.bin\" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
node:internal/modules/cjs/loader:1078
throw err;
^
Error: Cannot find module 'C:\Users\User\Desktop\next\dist\bin\next'
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Module._load (node:internal/modules/cjs/loader:920:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v18.16.0
I reinstalled node_modulesa and cleaned npm cache. But it alredy gives error.
Node.js version
Node.js v18.16.0
Example code
No response
Operating system
Windows 10 Pro
Scope
Runtime
Module and version
Not applicable.
It looks like next is not installed. You can install it globally with npm install next -g
@XausMaster could you check the above suggestion
npm install next -g
Thank you, it helped me. +rep
Author is @ghost, so getting more info from them wouldn't exactly be easy
Thank you! Your information has been immensely helpful to me too!!
It looks like
nextis not installed. You can install it globally withnpm install next -g