help icon indicating copy to clipboard operation
help copied to clipboard

Node can not find module. Please Help

Open ghost opened this issue 2 years ago • 3 comments

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.

ghost avatar Jul 12 '23 08:07 ghost

It looks like next is not installed. You can install it globally with npm install next -g

prettydiff avatar Jul 13 '23 19:07 prettydiff

@XausMaster could you check the above suggestion

preveen-stack avatar Aug 25 '23 08:08 preveen-stack

npm install next -g

Thank you, it helped me. +rep

dn1provskiy avatar Jan 31 '24 21:01 dn1provskiy

Author is @ghost, so getting more info from them wouldn't exactly be easy

avivkeller avatar Jun 07 '24 00:06 avivkeller

Thank you! Your information has been immensely helpful to me too!!

It looks like next is not installed. You can install it globally with npm install next -g

ghost avatar Jun 24 '24 06:06 ghost