运行npm start时React设置错误:找到配置文件但未配置任何条目。使用--help显示CLI选项

时间:2017-07-05 09:12:44

标签: reactjs

我在为我的反应应用设置环境时遇到错误。 根据编码预期,我没有做任何事情。 它只是一个你好的世界计划的反应。 我还在以下给定的URL中上传了我的节点模块。

我在Github中放下了我的代码:https://github.com/Arpan1089/reactapp

错误:

  

reactapp@1.0.0启动C:\ Users \ Sumeet \ Desktop \ reactapp   的WebPack-DEV-服务器

找到配置文件但未配置任何条目。 使用--help显示CLI选项。

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! reactapp@1.0.0 start: `webpack-dev-server`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the reactapp@1.0.0 start script 'webpack-dev-server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the reactapp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack-dev-server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs reactapp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls reactapp
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Sumeet\Desktop\reactapp\npm-debug.log

1 个答案:

答案 0 :(得分:0)

package.jsonscripts标记

中添加此内容
"scripts": {
   "start": "webpack-dev-server --hot"
},

使用

安装webpack-dev-server --hot和webpack-dev-server
npm install webpack-dev-server 

可能是您在localhost上的同一端口(8080)上运行了另一个进程,这将阻止您的应用运行。