无法设置React-Redux样板

时间:2017-09-08 15:48:08

标签: reactjs npm redux react-redux npm-install

我正在做一个项目并且遇到了我以前的样板问题,因此我尝试使用另一个。 我在github上发现this one非常相似,似乎是基本的。 我已经克隆了它并运行了npm install,但是当我运行服务器时,我收到了这个错误消息,我不知道如何修复它。 它与我以前的样板文件中的消息非常相似。

$ npm run webserver

> boilerplate-koa-redux-react@1.0.0 webserver C:\Users\qwepo\Desktop\RRWeather
> node api/src/server.js

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::3000
    at Object.exports._errnoException (util.js:907:11)
    at exports._exceptionWithHostPort (util.js:930:20)
    at Server._listen2 (net.js:1250:14)
    at listen (net.js:1286:10)
    at Server.listen (net.js:1382:5)
    at Application.app.listen (C:\Users\qwepo\Desktop\RRWeather\node_modules\koa\lib\application.js:74:24)
    at Object.<anonymous> (C:\Users\qwepo\Desktop\RRWeather\api\src\server.js:8:5)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "webserver"
npm ERR! node v4.6.0
npm ERR! npm  v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! boilerplate-koa-redux-react@1.0.0 webserver: `node api/src/server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the boilerplate-koa-redux-react@1.0.0 webserver script 'node api/src/server.js'.
npm ERR! This is most likely a problem with the boilerplate-koa-redux-react package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node api/src/server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs boilerplate-koa-redux-react
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls boilerplate-koa-redux-react
npm ERR! There is likely additional logging output above.

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

这是npm-debug.log文件

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'webserver' ]
2 info using npm@2.15.9
3 info using node@v4.6.0
4 verbose run-script [ 'prewebserver', 'webserver', 'postwebserver' ]
5 info prewebserver boilerplate-koa-redux-react@1.0.0
6 info webserver boilerplate-koa-redux-react@1.0.0
7 verbose unsafe-perm in lifecycle true
8 info boilerplate-koa-redux-react@1.0.0 Failed to exec webserver script
9 verbose stack Error: boilerplate-koa-redux-react@1.0.0 webserver: `node api/src/server.js`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:217:16)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at EventEmitter.emit (events.js:172:7)
9 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at ChildProcess.emit (events.js:172:7)
9 verbose stack     at maybeClose (internal/child_process.js:829:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid boilerplate-koa-redux-react@1.0.0
11 verbose cwd C:\Users\qwepo\Desktop\RRWeather
12 error Windows_NT 10.0.15063
13 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "webserver"
14 error node v4.6.0
15 error npm  v2.15.9
16 error code ELIFECYCLE
17 error boilerplate-koa-redux-react@1.0.0 webserver: `node api/src/server.js`
17 error Exit status 1
18 error Failed at the boilerplate-koa-redux-react@1.0.0 webserver script 'node api/src/server.js'.
18 error This is most likely a problem with the boilerplate-koa-redux-react package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     node api/src/server.js
18 error You can get information on how to open an issue for this project with:
18 error     npm bugs boilerplate-koa-redux-react
18 error Or if that isn't available, you can get their info via:
18 error
18 error     npm owner ls boilerplate-koa-redux-react
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

我该如何解决这个问题?为什么我遇到这个问题?

1 个答案:

答案 0 :(得分:0)

Error: listen EADDRINUSE :::3000已在该端口上运行某些内容。检查它是什么并杀死进程。我没有使用Windows,但有很多solutions in google