sh:SET:在`npm start`中找不到命令

问题描述 投票:0回答:1

我正在尝试运行一个反应项目。在我运行命令后:npm start,它给了我一个错误:

sh: SET: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] start: `SET PORT=3100 && node scripts/start.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jzhu321/.npm/_logs/2019-04-22T09_29_51_770Z-debug.log

我在package.json找到了配置:

  "scripts": {
    "start": "SET PORT=3100 && node scripts/start.js",
    "build": "node scripts/build.js",
    "test": "node scripts/test.js"
  },

我该如何解决这个问题?

node.js reactjs npm npm-install npm-scripts
1个回答
2
投票

Shell脚本没有qazxsw poi命令,只有:qazxsw poi

它应该是 :

SET
© www.soinside.com 2019 - 2024. All rights reserved.