我正在使用 React,刚刚添加了这个模块,ccxt。在添加模块之前一切都很好。模块安装正常。后来,我将此行添加到脚本中:
const ccxt = require ('ccxt');
然后当我发出npm start
它会引发错误:
[WARN] No ENV file found
[OKAY] Wrapping display Output to 78 Columns
16:29:02 backend.1 | info: Starting app...
16:29:03 frontend.1 | events.js:167
16:29:03 frontend.1 | throw er; // Unhandled 'error' event
16:29:03 frontend.1 | ^
16:29:03 frontend.1 | Error: listen EADDRINUSE 127.0.0.1:8080
16:29:03 frontend.1 | at Server.setupListenHandle [as _listen2] (net.js:1330:14)
16:29:03 frontend.1 | at listenInCluster (net.js:1378:12)
16:29:03 frontend.1 | at GetAddrInfoReqWrap.doListen [as callback] (net.js:1491:7)
16:29:03 frontend.1 | at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:55:10)
16:29:03 frontend.1 | Emitted 'error' event at:
16:29:03 frontend.1 | at emitErrorNT (net.js:1357:8)
16:29:03 frontend.1 | at process._tickCallback (internal/process/next_tick.js:63:19)
[DONE] Killing all processes with signal null
internal/util.js:232
throw new ERR_UNKNOWN_SIGNAL(signal);
^
TypeError [ERR_UNKNOWN_SIGNAL]: Unknown signal: null
at convertToValidSignal (internal/util.js:232:9)
at ChildProcess.kill (internal/child_process.js:411:5)
at EventEmitter.<anonymous> (/home/marcus/development/nodestuff/crypto-crawler/node_modules/foreman/lib/proc.js:49:11)
at EventEmitter.emit (events.js:187:15)
at ChildProcess.<anonymous> (/home/marcus/development/nodestuff/crypto-crawler/node_modules/foreman/lib/proc.js:45:13)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sails-react-webpack@0.2.0 start: `nf start --wrap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sails-react-webpack@0.2.0 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! /home/marcus/.npm/_logs/2018-06-03T21_29_03_091Z-debug.log
我尝试“npm install”并得到一个错误(即使 npm install --save ccxt 运行良好):
clean-webpack-plugin: /home/marcus/development/nodestuff/crypto-crawler/public/dist has been removed.
ModuleParseError: Module parse failed: /home/marcus/development/nodestuff/crypto-crawler/node_modules/ccxt/js/allcoin.js Unexpected token (60:10)
You may need an appropriate loader to handle this file type.
有什么建议告诉我什么或者你可以如何解决这个问题?