Commands npm start
& npm run build
are not working and give the following error messages (some phrases are in russian, please use translator if required):
from npm start
> [email protected] start C:\Users\liana\Documents\My stuff\Webdev\Practice Projects & Courses\react-cc-try2
> react-scripts start
"Courses\react-cc-try2\node_modules\.bin\" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
internal/modules/cjs/loader.js:834
throw err;
^
Error: Cannot find module 'C:\Users\liana\Documents\My stuff\Webdev\react-scripts\bin\react-scripts.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\liana\AppData\Roaming\npm-cache\_logs\2020-11-28T23_50_41_165Z-debug.log
from npm run build
> [email protected] build C:\Users\liana\Documents\My stuff\Webdev\Practice Projects & Courses\react-cc-try2
> react-scripts build
"Courses\react-cc-try2\node_modules\.bin\" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
internal/modules/cjs/loader.js:834
throw err;
^
Error: Cannot find module 'C:\Users\liana\Documents\My stuff\Webdev\react-scripts\bin\react-scripts.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\liana\AppData\Roaming\npm-cache\_logs\2020-11-28T23_51_00_496Z-debug.log
I've tried reinstalling everything, created a blank react app, nothing changed, absolutely. I have to use node node_modules/react-scripts/scripts/start.js
in order to start my local server and it works just fine, but this is not normal, I need a solution. Please help.
Try add this to your
package.json
file:},