Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"npm-run-all" Is Not Recognized As an Internal or External Command

I installed npm-run-all and also configured the environment variable (which may or may not be not required) on my Windows machine but am getting an error:

'npm-run-all' is not recognized as an internal or external command, operable program or batch file

I am trying to build my current project with npm run build which includes the script where the error is thrown:

npm-run-all -p build-css build-webpack

Do I have to do any additional things to make it run?

like image 212
topreddy Avatar asked Feb 04 '19 23:02

topreddy


People also ask

How do you solve this error npm is not recognized as an internal or external command operable program or batch file?

npm is not recognized as internal or external command operable program or batch file. I figured out that node js is installed in C:\Program Files\nodejs. Opening a command prompt in this directory makes npm work fine.

Is not recognized as an internal or external command npm start?

To solve the error "react-scripts is not recognized as an internal or external command, operable program or batch file", open your terminal in your project's root directory and install the react-scripts package by running npm install react-scripts and clear your npm cache if necessary.


2 Answers

  1. Make sure the npm-run-all is in your package.json devDependencies.
  2. If npm-run-all is present in your package.json, run npm i
  3. If not present install it, run: npm i npm-run-all -D

If error is still present, follow these steps:

  1. Remove node_modules folder: run rm -rf node_modules
  2. Install all dependecies: run npm i

Hope this helps!

like image 126
Jojo Tutor Avatar answered Sep 20 '22 11:09

Jojo Tutor


You may just need to run the following command first (from the directory with the package.json file)

npm install
like image 23
David Avatar answered Sep 18 '22 11:09

David