Npm在Run-RS上安装失败

时间:2020-04-02 20:08:03

标签: node.js mongodb npm transactions npm-install

我正在尝试安装run-rs(https://www.npmjs.com/package/run-rs)以在本地测试mongodb中的事务。但是,我收到以下错误,但找不到任何可以帮助他们解决的错误。请注意,由于当前的LTS版本在我正在处理的其他项目中引起了一些问题,因此我使用的节点是旧版本。

C:\WINDOWS\system32>npm i run-rs
(node:4504) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit

> kerberos@1.1.3 install C:\WINDOWS\system32\node_modules\kerberos
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.9.0 runtime=node arch=x64 libc= platform=win32)

C:\WINDOWS\system32\node_modules\kerberos>if not defined npm_config_node_gyp (node "C:\Users\Workstation\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Workstation\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
MSBUILD : error MSB1009: Die Projektdatei ist nicht vorhanden.
Schalter: build/binding.sln
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\Workstation\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:209:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Workstation\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\WINDOWS\system32\node_modules\kerberos
gyp ERR! node -v v12.9.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json'
npm WARN system32 No description
npm WARN system32 No repository field.
npm WARN system32 No README data
npm WARN system32 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! kerberos@1.1.3 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the kerberos@1.1.3 install 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\Workstation\AppData\Roaming\npm-cache\_logs\2020-04-02T19_51_20_562Z-debug.log

1 个答案:

答案 0 :(得分:0)

sudo npm install -g run-rs --unsafe-perm=true --allow-root

尝试此命令对我有用。