-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
common.gypi not found on Windows #1371
Comments
Here is the cause of your issue:
You are either explicitly or implicitly passing a bad |
@bnoordhuis I am passing Can you explain a bit more how this is related to my error? |
|
@bnoordhuis That's very confusing since the Readme says the I quickly tried with the I will try to see if I find some interesting info in existing issues. |
Oh, you're right. The documentation is simply wrong on that point. I'll get it updated.
Note that |
@bnoordhuis Does that means you have to get the node source tree in order to install an dependency using node-gyp?? I haven't seen that in the docs. I thought the header and the node.lib would be enough 🤔 Is it written somewhere? I would like to pin the place where it is explained in order to remember that. Does that mean that if I have multiple node install (via nvm-windows) I should have the node source for every version? |
If you don't specify anything, node-gyp downloads the appropriate headers. If you have those installed already but in a non-standard location where node-gyp won't find them, use |
OK that's exactly what I was doing first 😄 But it didn't work because for some reason node-gyp was trying to look for So I set the So I set the So I set the In my previous message, I was at this point. Then I looked in But when I read your last answer I realized that maybe the source problem was that So I deleted To sum up, |
Can confirm that Here was my solution, hope to help anyone else stuck behind corporate barriers. I'm using v16.2.0 as an example, so swap with your appropriate node version. Create a folder you're happy to house 16.2.0 data and point to it with the terminal command. I chose Create two subfolders within that folder: Download: https://nodejs.org/download/release/v16.2.0/win-x64/node.lib and https://nodejs.org/download/release/v16.2.0/node-v16.2.0-headers.tar.gz Place Open the headers.tar.gz file. I used 7zip. Once inside the tar, navigate to Extract the two Extract everything else into the Run using |
|
I solved this by manually download cache in windows powershell: |
Verbose output (from npm or node-gyp):
I tried to install
mpl
and had an error when rebuilding node-lz4.I tried to clone and install
node-lz4
whith the same error.After some research I think this is caused by node-gyp looking for SDK include in
C:\Appli\nodejs
instead ofC:\Users\user\.node-gyp
wherecommon.gypi
is presentI tried to set the devdir by setting
npm config set devdir C:\Users\user\.node-gyp
, but this doesn't change anything.I've reproduced this setup on another machine of mine.
The text was updated successfully, but these errors were encountered: