2

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: 
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

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.

kostix
  • 51,517
  • 14
  • 93
  • 176
Keeano
  • 309
  • 8
  • 33

1 Answers1

2

The error you're getting is coming from node-gyp which is failing to complile nodegit. There's an issue on the nodegit github page that might help: "I got an error when i npm install in nodegit on windows10"

On an unrelated note, you mentioned that you're using the git-ftp node package. This package has only one release, version v0.0.0, and hasn't been updated for 3 years. You'll probably be better off steering clear of that package. The issue you're getting also stems from the fact that git-ftp depends on nodegit.

Nico
  • 2,645
  • 19
  • 25
  • 1
    Good point, I ended up going the Docker route in the end but I should learn to check the status of these repositories as well. – Keeano Nov 17 '18 at 20:27