-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node-pre-gyp Appveyor build failing for Windows x86 using Node 4.4.3 #209
Comments
This looks like something broken in node-gyp. node-gyp is failing in readCAFIle which recently was added in nodejs/node-gyp#837 /cc @bnoordhuis |
It looks like something (.npmrc? something in the environment?) is setting |
Should this be filed on node-gyp itself? |
I've got a two step work around and I filed a bug with node-gyp. The error we see is that the string The work around is to set the I added these to install phase in # work around an issue with node-gyp v3.3.1 and node 4x
# package.json has no certificates in it so we're cool
# https://github.com/nodejs/node-gyp/issues/921
- cmd: npm config set -g cafile=package.json
- cmd: npm config set -g strict-ssl=false |
I haven't tracked it down completely, but I can confirm this issue while erroring in |
@BergWerkGIS 68301ce looks like a workaround and not a fix for the underlying problem. Correct? If so, do you have any hunches on the underlying problem (that would allow us to remove that workaround)? |
@springmeyer I'm able to confirm that this error occurs with Another workaround is used in Investigating ... |
Thank you @BergWerkGIS I'm glad someone else is also taking a look |
Progress updateDowngrading to
If this error still occurs after Still searching where |
Hm, this is getting stranger. The error is intermittent, sometimes it occurs and sometimes it does not. I've only been able to reproduce it with Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "node-pre-gyp rebuild -C c:\mb\node-pre-gyp\test\app2 --clang=1 --msvs_version=2015 --custom_include_path=../include --toolset=cpp11 --loglevel=error" gyp ERR! configure error gyp ERR! stack Error: ENOENT: no such file or directory, open 'c:\mb\node-pre-gyp\test\app2\undefined' gyp ERR! stack at Error (native) gyp ERR! stack at Object.fs.openSync (fs.js:549:18) gyp ERR! stack at Object.fs.readFileSync (fs.js:397:15) gyp ERR! stack at readCAFile (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\install.js:466:15) gyp ERR! stack at download (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\install.js:438:22) gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\install.js:185:19 gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\mkdirp\index.js:48:26 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Windows_NT 10.0.14905 If I run the same command
directly from the command line it always succeeds:
My current hunch is that the problem just occurs with the tests and not with I think somewhere on the way the environment gets screwed (sometimes, don't know yet when and why) and thus results in failures. This |
@BergWerkGIS lets see how deep the rabbit hole goes. You mentioned making a test for this, anything worth sharing yet? |
Yeah, curious if we ever find out what's going on here.
Sorry, no dedicated test to consistently reproduce. |
One step further: gyp verb get node dir no --target version specified, falling back to host node version: 4.4.7 gyp verb command install [ '4.4.7' ] gyp verb install input version string "4.4.7" gyp verb install installing version: 4.4.7 gyp verb install --ensure was passed, so won't reinstall if already installed gyp verb install version is already installed, need to check "installVersion" gyp verb got "installVersion" 0 gyp verb needs "installVersion" 9 gyp verb install version is no good; reinstalling gyp verb ensuring nodedir is created C:\Users\bergw\.node-gyp\4.4.7 gyp http GET https://nodejs.org/download/release/v4.4.7/node-v4.4.7-headers.tar.gz gyp WARN install got an error, rolling back install gyp verb command remove [ '4.4.7' ] gyp verb remove using node-gyp dir: C:\Users\bergw\.node-gyp gyp verb remove removing target version: 4.4.7 gyp verb remove removing development files for version: 4.4.7 gyp ERR! configure error gyp ERR! stack Error: ENOENT: no such file or directory, open 'c:\mb\node-pre-gyp\test\app2\undefined' gyp ERR! stack at Error (native) gyp ERR! stack at Object.fs.openSync (fs.js:549:18) gyp ERR! stack at Object.fs.readFileSync (fs.js:397:15) gyp ERR! stack at readCAFile (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\install.js:466:15) gyp ERR! stack at download (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\install.js:438:22) gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\install.js:185:19 gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\mkdirp\index.js:48:26 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Windows_NT 10.0.14905 Monitoring If I execute just the last command shown before the error from the command line the directories don't seem to get touched.
Maybe there is some kind of race condition where one test tries to leave behind a clean slate (deleting node headers/libs) and the next test has already started. Also not sure yet why |
I think my initial hunch about something strange happening during
Unfortunately stepping through Also noticed that sometimes commands shell out to
and sometimes to
Still searching for the where and why ... |
Dropping some info: with node-gdal this is only happening with node v4.x and v5.x x86 builds and not v6.x (both x64 and x86 work): https://ci.appveyor.com/project/brianreavis/node-gdal/build/682 |
Further isolated this issue. To recap: the error we are trying to avoid is:
I've found that the workaround of:
Does solve
So, we need a different workaround. Luckily I've found that both of the above errors can be avoided by upgrading
I'm now going to close this since I don't see anything more to do on the node-pre-gyp side. |
Appveyor has a problem with Node 4 32 bit, for details see mapbox/node-pre-gyp#209.
I was having trouble building for Windows x86 using Node.js 4.4.3, when I noticed that the Appveyor build for node-pre-gyp itself is failing for the same reason:
The failed build can be seen here:
https://ci.appveyor.com/project/Mapbox/node-pre-gyp/build/1.0.373/job/h12w3ymhbyg6ltq6#L481
The build for Windows x64 using Node 4.4.3 succeeds, however.
I see that the node-gyp command is failing, but I thought perhaps node-pre-gyp might be missing something for the setup for the 4.4.3 release.
Any thoughts as to what is missing here? Now that 4.4.3 is the LTS version, it would be great to be able to have nice precompiled binaries for it.
Thank you!
The text was updated successfully, but these errors were encountered: