I'm trying to install webworker-thread
s, a node addon that requires gyp. I followed the gyp
instructions for setup, so far I'm still getting an error when trying to "rebuild
":
C:\Program Files\nodejs\node_modules\webworker-threads>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack at errnoException (child_process.js:980:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:771:34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files\nodejs\node_modules\webworker-threads
gyp ERR! node -v v0.10.8
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
I'm on a Windows 7 32 bit system. Sooo to spare some time here's my personal checklist:
Paths: node is in both user and system path. npm is in user path. Python path is set too.
Do you guys by any chance notice something I'm doing wrong?
Thanks a lot in advance for your guidance!
Please uninstall node. js and use the Node v14. x. It will solve it automatically.
On Windows. Install the current version of Python from the Microsoft Store package. Install tools and configuration manually: Install Visual C++ Build Environment: Visual Studio Build Tools (using "Visual C++ build tools" workload) or Visual Studio Community (using the "Desktop development with C++" workload)
node-gyp dependencies If you only need to compile add-ons during the project setup, Node. js should cover it for you. However, if you are an add-on developer, you probably need to install node-gyp globally. To use node-gyp, first, we'll need to install a Python runtime, the make utility, and a C or C++ compiler.
If the most complex node-gyp -related dependency you have in your project is something common like node-sass then this is usually the fix you need. Open the file, find the MACOSX_DEPLOYMENT_TARGET key value and replace it with your current Mac OS version ( 10.15. 3 for Catalina for example).
try npm install –msvs_version=2012
. This command will ask NPM to use visual studio 2012 to build.
http://www.kevgriffin.com/specifying-visual-studio-version-in-npm-installs/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With