NPM run * doesn't do anything

后端 未结 2 1422
萌比男神i
萌比男神i 2020-11-22 13:11

I was running an Electron project, and everything worked just fine. But now when I run any of the scripts in my package.json (including npm start), it just escapes a line an

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 14:10

    npm has a ignore-scripts configuration key. It's expected value is a Boolean and it's set to false by default.

    Perhaps it has inadvertently been set to true.

    To get/set the ignore-scripts 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
      

提交回复
热议问题