最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

[Npm在运行库中安装失败

网站源码admin15浏览0评论

[Npm在运行库中安装失败

[Npm在运行库中安装失败

我正在尝试安装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

> [email protected] 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! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
回答如下:
sudo npm install -g run-rs --unsafe-perm=true --allow-root

尝试使用此命令对我有用。

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论