#StackBounty: #npm #deployment #npm-install Installation of NPM Package is failing

Bounty: 50

I am trying to use Bitbuckets Pipelines to auto deploy with my commits to a test project while I practice a solid solution.

One way I have seen to do this is with “git-ftp”, I am open to other NPM packages if someone knows.

Currently, when trying to install this package I get the below error

[nodegit] Everything is ready to go, attempting compilation
[nodegit] Building native node module.
{ Error: Command failed: 
v1node_modulesnodegitnode_modules.binnode-gyp rebuild
gyp ERR! build error
gyp ERR! stack Error: `D:VS_EnterpriseMSBuild15.0BinMSBuild.exe` failed 
with exit code: 1
gyp ERR! stack     at ChildProcess.onExit 
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 
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" 
gyp ERR! cwd C:UsersprofileDocumentscompanyProjectscoming_soon- 
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' }
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:UsersprofileAppDataRoamingnpm-cache_logs2018-11- 

I have taken steps to fix this by uninstalling all versions of Python and sticking to version 2.7 as it is supposed to be the most stable. (Article online said that the newer versions don’t support all node packages.)

I have also installed the Visual Studio Build Tools even though they have been installed before multiple times. I did this both from the NPM install script as well as manually.

At this point, I am unaware of what the real issue is here and I’m not the only one running into this issue, so I would like to shine a light on this issue and find a solid solution and answer to fix this.

Any and all help is greatly appreciated!

P.S If there is also another way to setup git-ftp style without using that package please do let me know and I can try that solution as well. At the end of the day, my site uses FTP to upload to our staging site, for this reason, I want to be able to auto-deploy for staging and then write another script for SSH to our production.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.