node-gyp
node-gyp copied to clipboard
How to install node-gyp on Windows 10 (22H2)
Hello:
I have to install this package in order to install other npm packages.
However, I found it is not easy.
It seems this package need VS 2015 community version, right? But I don't have this old VS version, I have only VS2019 and VS2022.
Besides, due to the installation error, I have to look at the configure.js file used by node-gyp. If I understand it correctly, this configure.js file assume that I am running on Windows 32-bit, but I am running on Windows 10 64-bit. From my understanding, 32-bit for Windows 10 does not exist any more, or at least not the one most people are using.
Since this package has been actively developed, how about catch up with the update? I mean it is better to get rid of VS2015 community, and change to VS2022, since VS2019 does not support .net 6.0, which is LTS. Also, please consider to think that most of the Windows system nowadays are using 64-bit, not 32-bit any more.
Thanks,
It seems this package need VS 2015 community version, right?
Nope. node-gyp v8.4.0 and above work well with VS 2022.
Perhaps look at the Windows tests we run:
- https://github.com/nodejs/node-gyp/blob/main/.github/workflows/visual-studio.yml#L16
Hi, Take some time to close my issue. Now I have more issues to ask:
- From readme, it seems I can install Python 3.10 from Microsoft Store, in order to use it? I did installed Python 3.10 from Micorsoft Store, and I deleted Python 3.9 from Windows 10. But I always get the following installatin errors:
- The output for running this command:
D:\nodejs\qtum-insight-api>npm install -g qtumcore-node@latest
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
......
C:\Users\John\AppData\Roaming\npm\node_modules\qtumcore-node\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Users\John\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Program Files\Python39\python.exe", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\John\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.
(C:\Users\John\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16) gyp ERR! stack at C:\Users\John\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21) gyp ERR! System Windows_NT 10.0.19045 gyp ERR! command "C:\Users\John\AppData\Roaming\npm\node_modules\qtumcore-node\node_modules\node\bin\node.exe" "C:\Users\John\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\John\AppData\Roaming\npm\node_modules\qtumcore-node\node_modules\bufferutil gyp ERR! node -v v8.17.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok .... Since I already deleted Python 3.9.13 from Windows 10 (Since I think this package needs Python 3.10 from Microsoft Store); so this error seems to be logic. But the fact is not the case, before I tried to use Python 3.10 from Microsoft store, I did install Python 3.9.13 and setup correct PATH and PYTHON environment variables, but I still got the same errors as this time, even this time, the errors are logic. Please advise what to do? My OS: Windows 10 (22H2 OS build 19045.2846); C:>node-gyp --version v9.3.1 C:>node --version v6.17.1 (I downgraded node version in order to install qtumcore) C:>npm --version 5.4.2 (I downgraded npm version in order to install qtumcore)
gyp ERR! node -v v8.17.0
- Ouch! https://github.com/nodejs/release#release-schedule
gyp ERR! node-gyp -v v3.6.2
- Ouch! The current version is v9.3.1 so https://github.com/nodejs/node-gyp/tree/main/docs#readme
Hi, Please give me some version requirements to install node-gyp? The version for Node.js and verson for NPM. Besides, can I use node-gyp to install npm package: qtumcore-node, the latest version of this package was released on 2018.
Use npm
to install npm packages. Maybe open an issue here https://github.com/qtumproject/qtumcore-node#readme
Hi, I want to know which version of node.js is required to install node-gyp? Do I have to install 32-bit node.js?
C:\Users\John>npm --version 5.4.2
C:\Users\John>node --version v9.11.2
C:\Users\John>npm config set msvs_version 2022 npm WARN npm npm does not support Node.js v9.11.2 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8. npm WARN npm You can find the latest version at https://nodejs.org/
C:\Users\John> Hi, I read the documents at: https://github.com/nodejs/node-gyp/tree/main/docs#readme I have installed node.js version 9.11.2 with npm version 5.4.2. And I re-installed Python 3.9.11. I did this, since the qtumcore package was released in year 2018, and node.js 9.11.2 was also released in year 2018. But which version of node.js and which version of node-gyp I should install on Windows 10?
This issue seems no longer relevant as it uses a no longer supported version of Node and has been stale for a long time. If there are no objections, I will close this issue next Mon-Tue. In case something similar happens again please open a new issue.