admin管理员组

文章数量:1304199

I am newbie to react technology and I faced an error while running a react app:

I have created demo react app without any additional addons and then I am trying to "npm start" - below error appears on TERMINAL.

PS C:\DATA\MyWork\react-app-poc> npm start
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

I have even tried npm run start but I am unable to start the app. For Node.js, I am using version 16.13.0 LTS.

What is the issue here?

I am newbie to react technology and I faced an error while running a react app:

I have created demo react app without any additional addons and then I am trying to "npm start" - below error appears on TERMINAL.

PS C:\DATA\MyWork\react-app-poc> npm start
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

I have even tried npm run start but I am unable to start the app. For Node.js, I am using version 16.13.0 LTS.

What is the issue here?

Share Improve this question asked Feb 4 at 7:26 Creative LearnerCreative Learner 233 bronze badges 1
  • Check this one out - stackoverflow/questions/71482020/… – Martin Wangen-Eriksen Commented Feb 5 at 10:18
Add a comment  | 

1 Answer 1

Reset to default 0

The error indicates that either you do not have 'npm' or 'node' installed, or there was an error installing them.

Check if they are installed by running the following commands in the terminal

'node -v'

'npm -v'

If they are not installed, make sure to install them.

本文标签: reactjsUnable to start React App Error quotCannot find module 39npmclijs39quotStack Overflow