Skip to content
Advertisement

npm not running scripts in package.json

The problem is that when I do npm start OR npm run customScriptCommand npm just not doing anything with the project and quickly just return new line in the terminal.

I’ve tried removing node and npm from my machine and then do brew installation for node and npm, but it does not fix the problem.

Then I tried removing node and npm from the brew installation and installing it again from nvm, but it also does not fix the problem.

NPM Details

JavaScript

NodeJS Details

JavaScript

Scripts in package.json

JavaScript

If I do node ./bin/www OR DEBUG=app-name:* nodemon ./bin/www it will work:

enter image description here

Update

  • I’ve tried on other project that does not have problem on my colleague’s machine, with git clone do npm install and tried to run the project, but it still failed

  • Even with fresh project which I just did npm init -y it fail,

JavaScript

Advertisement

Answer

npm config set ignore-scripts false would do the trick for you.

The struggle is real my friend, not following random tutorials from now.

https://github.com/npm/cli/issues/541

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement