NPM包的安装失败

NPM包的安装失败,npm,deployment,npm-install,Npm,Deployment,Npm Install,我正在尝试使用BitBucket管道来自动部署我对测试项目的承诺,同时我在实践一个可靠的解决方案 我看到的一种方法是使用“git ftp”,如果有人知道,我会对其他NPM包开放 目前,在尝试安装此软件包时,我遇到以下错误 [nodegit] Everything is ready to go, attempting compilation [nodegit] Building native node module. { Error: Command failed: C:\Users\profi

我正在尝试使用BitBucket管道来自动部署我对测试项目的承诺,同时我在实践一个可靠的解决方案

我看到的一种方法是使用“git ftp”,如果有人知道,我会对其他NPM包开放

目前,在尝试安装此软件包时,我遇到以下错误

[nodegit] Everything is ready to go, attempting compilation
[nodegit] Building native node module.
{ Error: Command failed: 
C:\Users\profile\Documents\company\Projects\coming_soon- 
v1\node_modules\nodegit\node_modules\.bin\node-gyp rebuild
gyp ERR! build error
gyp ERR! stack Error: `D:\VS_Enterprise\MSBuild\15.0\Bin\MSBuild.exe` failed 
with exit code: 1
gyp ERR! stack     at ChildProcess.onExit 
(C:\Users\profile\Documents\company\Projects\coming_soon- 
v1\node_modules\nodegit\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit 
(internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" 
"C:\\Users\\profile\\Documents\\company\\Projects\\coming_soon- 
v1\\node_modules\\nodegit\\node_modules\\node-gyp\\bin\\node-gyp.js" 
"rebuild"
gyp ERR! cwd C:\Users\profile\Documents\company\Projects\coming_soon- 
v1\node_modules\nodegit
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
killed: false,
code: 1,
signal: null,
cmd: 'C:\\Users\\profile\\Documents\\company\\Projects\\coming_soon- 
v1\\node_modules\\nodegit\\node_modules\\.bin\\node-gyp rebuild' }
undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 13
npm ERR! nodegit@0.5.0 install: `node lifecycleScripts/install`
npm ERR! Exit status 13
npm ERR!
npm ERR! Failed at the nodegit@0.5.0 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\profile\AppData\Roaming\npm-cache\_logs\2018-11- 
07T04_57_44_011Z-debug.log
我已经采取步骤来解决这个问题,卸载了所有版本的Python并坚持使用2.7版,因为它应该是最稳定的。(在线文章称,较新版本不支持所有节点包。)

我还安装了VisualStudio构建工具,尽管它们以前已经安装过多次。我从NPM安装脚本以及手动完成了这项工作

在这一点上,我不知道这里真正的问题是什么,我不是唯一一个遇到这个问题的人,所以我想在这个问题上发光,并找到一个解决方案和答案来解决这个问题

非常感谢您的任何帮助


如果还有另一种方法可以不使用该软件包而设置git ftp样式,请务必让我知道,我也可以尝试该解决方案。一天结束时,我的站点使用FTP上传到我们的登台站点,因此,我希望能够自动部署登台,然后为SSH编写另一个脚本到我们的生产中。

您收到的错误来自
节点gyp
,它无法完成
节点注册
。nodegit github页面上有一个问题可能会有所帮助:


另一方面,您提到您正在使用node包。该软件包只有一个版本v0.0.0,已经3年没有更新了。你最好避开那个包裹。您遇到的问题也源于git ftp依赖于nodegit的事实。

您是否检查了日志文件:C:\Users\profile\AppData\Roaming\npm-cache\u logs\2018-11-07T04\u 57\u 44\u 011Z-debug。logGood,我最终选择了Docker路线,但我应该学会检查这些存储库的状态。