我正在尝试将该程序设置为在我的PC上运行> https://github.com/BitMEX/api-connectors/tree/master/official-ws/delta-server
我做了所有步骤,但是当我运行“ node index.js”时,我得到了
"Error: Cannot find module 'lodash'"
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\official-ws\delta-server\api-connectors\official-
ws\nodejs\index.js:2:11)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
所以我问了一些不和谐的人,他们告诉我一切都已经设置好了,我只需要运行“ npm install -g _n”
所以我运行了这个错误:
Error: ENOENT: no such file or directory, open
'C:\Users\Dylan\AppData\Roaming\npm\node_modules\n_\lodash-3.*.tgz'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! n_@1.4.6 postinstall: `npm pack lodash@^3 && targz extract lodash-
3.*.tgz extraneous/lodash3`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the n_@1.4.6 postinstall 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\Dylan\AppData\Roaming\npm-cache\_logs\2018-09-
15T00_37_09_934Z-debug.log