npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Getting error when npm run all command used

I am new to use npm and when I run the following command I am getting error:
npm run all (changed working directory to where package.json file is available)

Error I am getting is

npm run all runs a script called all declared in the package.json file of your project. From the screenshot, that runs in order (abbreviated):

tsc &&
gulp.cmd bundle &&
ng build --prod

From the output in the screenshot it is past the tsc command and one of the other two. I am not familiar with either gulp or ng, but by scrolling back through the log you can probably work out which one was running.

It is sometimes helpful when chasing an error to run the individual commands directly to reduce the noise and focus on the one that is failing.

It’s failing at the ng build command, specifically in the rxjs package, which is usually due to having an old version of rxjs or one that isn’t compatible with your version of Angular.

This is really beyond the scope of npm support since the command is throwing the error in a subsequent package. So you should probably open an issue with angular/cli on Github.

Thank you for your quick response. Observed that rxjs was of different versions in user machine and build machine. Using the same version as in users now we are able to run the command successfully.

Thank you