【问题标题】:Error: Server terminated unexpectedly with code: null signal: SIGTERM错误:服务器意外终止,代码:空信号:SIGTERM
【发布时间】:2016-11-23 19:46:15
【问题描述】:
> @ start C:\mohan\experiments\react\boilerplates\MyApp

babel-node tools/run start
[12:12:57] Starting 'start'...
[12:12:57] Starting 'clean'...
[12:12:58] Finished 'clean' after 49 ms
[12:12:58] Starting 'bound copy'...
[12:12:58] Finished 'bound copy' after 162 ms
webpack built 869f3b2ac4a25f52f21e in 9500ms
Child
Time: 9500ms
Asset Size Chunks Chunk Names
main.js?869f3b2ac4a25f52f21e 4.19 MB 0 [emitted] main
Child
Time: 8319ms
Asset Size Chunks Chunk Names
../../server.js 197 kB 0 [emitted] main
../../server.js.map 213 kB 0 [emitted] main
webpack: bundle is now VALID.
webpack: bundle is now INVALID.
webpack building...
webpack built 869f3b2ac4a25f52f21e in 502ms
Child
Time: 502ms
Child
Time: 8319ms
Asset Size Chunks Chunk Names
../../server.js 197 kB 0 [emitted] main
../../server.js.map 213 kB 0 [emitted] main
webpack: bundle is now VALID.
C:\mohan\experiments\react\boilerplates\MyApp\tools\runServer.js:71
throw new Error(`Server terminated unexpectedly with code: ${ cod
^

Error: Server terminated unexpectedly with code: null signal: SIGTERM
at ChildProcess.server.once (runServer.js:53:15)
at ChildProcess.g (events.js:286:16)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\n
npm ERR! node v6.2.0
npm ERR! npm v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! @ start: babel-node tools/run start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start script 'babel-node tools/run start'.
npm ERR! Make sure you have the latest version of node.js and npm install
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node tools/run start
npm ERR! You can get information on how to open an issue for this project
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\mohan\experiments\react\boilerplates\MyApp\npm-debug.log

我是 React 初学者工具包的新手。关注我做过的事情

  1. git clone -o react-starter-kit -b master --single-branch https://github.com/kriasoft/react-starter-kit.gitMyApp
  2. npm 安装
  3. npm start [解决此问题]

请帮忙。

【问题讨论】:

  • 这方面有什么更新吗?

标签: reactjs react-starter-kit


【解决方案1】:

您可以通过在 tools/sunServer.js 中注释掉第 51 到 57 行来临时解决这个问题。像这样:

// if (pending) {
//   server.once('exit', (code, signal) => {
//     if (pending) {
//       throw new Error(`Server terminated unexpectedly with code: ${code} signal: ${signal}`);
//     }
//   });
// }

这将解决问题并让您重新开始工作,但是我不确定问题的实际根本原因。

【讨论】:

  • 这并不能解决问题,因为 vendor.js 和 client.js 都不会生成。
  • @juancancela 他们似乎生成得很好,你能详细说明一下吗?
猜你喜欢
  • 1970-01-01
  • 2019-05-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-07-06
  • 2015-05-04
  • 2013-04-16
  • 2013-08-14
相关资源
最近更新 更多