javascript - 在Mac OS X 10.11.3下运行npm start 提示:npm ERR! Darwin 15.3.0
迷茫
迷茫 2017-04-10 17:25:39
[JavaScript讨论组]

运行npm start
提示错误:

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.7.1
npm ERR! npm  v3.6.0

npm ERR! missing script: start
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/用户名/snapterest/npm-debug.log
迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

全部回复(4)
高洛峰

npm run start 或者 npm run-script start
并且需要在package.json的 scripts 中定义start为字段的命令

PHP中文网

你没有写 start 的 script

怪我咯

检查当前目录下的package.json里的"script"下是否存在"start"这个属性。

PHP中文网

package.json

{
  "scripts": {
    "start": "echo 'hello world!'"
  }
}
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号