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?
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.