npm run *script* doesn’t do anything

By 14th November 2020 September 30th, 2021 Tutourial & Tips

have you tried running a script which was defined in your package.json and it didn’t do anything?

I had this issue because I must have set the ignore-scripts to true after reading this article regarding Package install scripts vulnerability.




npm has a ignore-scripts configuration key. Its expected value is a Boolean and it’s set tofalse by default.

Perhaps it has inadvertently been set to true.

To get/set the ignore-scripts the configuration you can utilize the npm-config command:

  1. Check its current setting by running:
    npm config get ignore-scripts
  2. If the aforementioned command returns true then reset it to false by running:
    npm config set ignore-scripts false