当我今天在react上测试我的代码时,我无法启动开发服务器,错误显示如下。
[email protected] start /Users/linyujie/Files/Softprofiles/SourceCode/successmanagerreact npm run serve:dev
> <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d1bcb0a5b4a3b8b0bd91e3ffe1ffe1" rel="noreferrer noopener nofollow">[email protected]</a> serve:dev /Users/linyujie/Files/Softprofiles/SourceCode/successmanagerreact
> webpack-dev-server --host 0.0.0.0 --port 3000 --open --env dev
events.js:183
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 0.0.0.0:3000
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at doListen (net.js:1501:7)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:678:11)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d2bfb3a6b7a0bbb3be92e0fce2fce2" rel="noreferrer noopener nofollow">[email protected]</a> serve:dev: `webpack-dev-server --host 0.0.0.0 --port 3000 --open --env dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7815190c1d0a111914384a56485648" rel="noreferrer noopener nofollow">[email protected]</a> serve:dev 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! /Users/linyujie/.npm/_logs/2018-06-25T04_55_36_232Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6c010d18091e050d002c5e425c425c" rel="noreferrer noopener nofollow">[email protected]</a> start: `npm run serve:dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0f626e7b6a7d666e634f3d213f213f" rel="noreferrer noopener nofollow">[email protected]</a> start 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! /Users/linyujie/.npm/_logs/2018-06-25T04_55_36_255Z-debug.log
最佳答案
关于node.js - npm start 今天失败并出现以下错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51016595/