WebStorm - error: Please specify npm package

后端 未结 12 2290
忘掉有多难
忘掉有多难 2020-12-29 06:53

Webstorm throws an error when trying to run a command specified in package.json:

\"devDependencies\": {},
      \"scripts\": {
        \"dev\": \"./node_modu         


        
12条回答
  •  隐瞒了意图╮
    2020-12-29 07:34

    Ran into the same issue after upgrading from 11.0.3 to 2016.1. Not sure if some configuration was wrongly copied or if they added a new field to specify the npm package.

    Go to

    Run > Edit Configurations > Defaults > npm

    Browse to select a Node interpreter, using the [...] button.

    You should find the Npm package field, fill it with YOUR_PATH_TO_NODE/lib/node_modules/npm.

    If it does not work right away, restart WebStorm so that it is taken into account.

提交回复
热议问题