找不到 npm 启动脚本? [英] npm start - script not found ?
本文介绍了找不到 npm 启动脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在阅读这篇文章>
I was reading this article >
https://www.smashingmagazine.com/2018/05/building-mobile-apps-using-react-native-wordpress/
并想尝试一下,我已经做到了>
and wanted to try it out, and I got as far >
cd react-native-woo
npm start
我的 mac 正在抛出这个错误...
And my mac is throwing this error...
Happy hacking!
Babylon7:desktop magic$ cd react-native woo
Babylon7:react-native magic$ npm start
npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/magic/.npm/_logs/2018-08-29T00_47_08_644Z-debug.log
Babylon7:react-native magic$
推荐答案
您没有将启动脚本添加到 package.json 文件的脚本属性中.
You did not add a start script to the scripts property of the package.json file.
类似于:
"scripts":{
"start": "node index.js"
}
其中 index.js
= 您的主服务器文件.
Where index.js
= your main sever file.
这篇关于找不到 npm 启动脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文