The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
"react-scripts" is not recognized
Installled NPM and tried to run the following command (per my website designer) to load edited local content back to my website:
npm run build
But I received the following error:
“react-scripts” is not recognized (and then a bunch of ERR! codes)
Any idea what the issue is? I’m a beginner with very little programming knowledge so any help is very appreciated.
It looks like you’re missing
react-scripts. Have you installed the local packages? Use:
I downloaded node.js for Windows and installed that way.
Do I just type in “npm install” in a command line? In what directory?
Sorry - total newbie here.
No problem . Yes, run
npm install in the command line in the same directory where you ran
npm run build (i.e. the project directory). That should install all the necessary dependencies of the project.
ok, that worked and it looks like the build was working but then I received a new error…
but it looks like there is a build folder in the target directory. Make sense?
Looks like some tool is using an older version of Browserlist, you can check out which one with
npm ls browserslist@<4
ok, tried that but it says the “system can not find the file specified”…
Right, sorry, you’d need to escape the
npm ls "browserslist@<4"
or better yet just
npm ls browserslist
ok, it says the following…
when I installed node.js, I installed 10.15.3 LTS (not 11.12.0 Current).
Could that be an issue?
sorry…meant to say it says the following…
<empty> is being removed because it thinks it’s HTML, you can avoid that by putting the text in fences:
``` '-- <empty> ```
Or by starting each line with four spaces:
That’s weird though, did you run the command in the same project directory? Otherwise, try
npm ls -g browserslist
oh, ok. got it
yes - ran it in the same project directory.
same result with the npm ls -g browserslist