WebStorm - error: Please specify npm package

后端 未结 12 2498
忘掉有多难
忘掉有多难 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:20

    In Linux/Ubuntu: One of the reasons why webstorm throws this error is because of false directory names for node interpreter ("Run > Edit configurations > Defaults> npm > node interpreter").

    In the recent node installation the default node interpreter directory is usr/bin/nodejs instead of usr/bin/node.

    So, correct the node interpreter from "usr/bin/node" to "usr/bin/nodejs" and it works fine.

提交回复
热议问题