node.js - 启动npm start 报错 ,怎么办
PHP中文网
PHP中文网 2017-04-17 16:16:19
[Node.js讨论组]

verbose pkgid doracms@1.1.1
16 verbose cwd /Users/myjianyue/Desktop/projectsSpace/express/DoraCMS
17 error Darwin 16.4.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" "app.js"
19 error node v6.9.5
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error doracms@1.1.1 start: node ./bin/www "app.js"
22 error Exit status 1
23 error Failed at the doracms@1.1.1 start script 'node ./bin/www "app.js"'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the doracms package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node ./bin/www "app.js"
23 error You can get information on how to open an issue for this project with:
23 error npm bugs doracms
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls doracms
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

PHP中文网
PHP中文网

认证0级讲师

全部回复(3)
高洛峰

贴出npm官网对npm start的解释(官网链接):

就是说:
npm start 会默认执行package.json中scripts对象下"start"字段对应的语句,如果scripts对象下没有设置”start“字段的值,则npm会默认执行这条语句:

node server.js

请先检查package.json中的配置,scripts下是否有start字段,如没有,看是否有对应的server.js文件。

高洛峰

Make sure you have the latest version of node.js and npm installed.
If you do, this is most likely a problem with the doracms package,not with npm itself.Tell the author that this fails on your system:

这是上面的错误提示

大家讲道理

贴一下你的package.json的文件配置,

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

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