[英]Can not run 'npm start' ReactJS
我是ReactJS nad Yeoman生成器中的新手。 我有一个问题,因为使用此命令生成项目时
然后设置项目名称,使用CSS并启用postcss。 当我尝试使用推荐的npm start#或npm run serve时
npm运行发球
@ 0.0.1服务C:\\ Users \\ user \\ Desktop \\ ProjectReact节点server.js --env = dev
events.js:183 throw er; // Unhandled 'error' event ^ Error: listen EACCES 127.0.0.1:8000 at Object._errnoException (util.js:992:11) at _exceptionWithHostPort (util.js:1014:20) at Server.setupListenHandle [as _listen2] (net.js:1338:19) at listenInCluster (net.js:1396:12) at GetAddrInfoReqWrap.doListen [as callback] (net.js:1505:7) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @0.0.1 serve: `node server.js --env=dev` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @0.0.1 serve 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! C:\\Users\\user\\AppData\\Roaming\\npm-cache\\_logs\\2018-05-25T07_27_23_660Z-debug.log
您用于运行server.js文件中的节点应用程序的端口是8000,该端口已被占用,并且正在其上运行其他进程。
您可以在8000端口上终止当前正在运行的进程,也可以将server.js
文件中的端口更改为8000端口以外的端口。 然后尝试再次运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.