Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

node-gyp troubles with installation

Tags:

node-gyp

I'm trying to install webworker-threads, 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.

  • Python: 2.7.3 installed at C:\Python27
  • VisualStudio C++ 2010 AND 2012 Express installed
  • node version v0.10.8
  • ran everything with administrator privileges
  • Commands executed: npm install -g node-gyp
  • npm install webworker-threads
  • Then the error appears.

Do you guys by any chance notice something I'm doing wrong?

Thanks a lot in advance for your guidance!

like image 428
Doidel Avatar asked May 30 '13 10:05

Doidel


People also ask

How do I get rid of gyp error?

Please uninstall node. js and use the Node v14. x. It will solve it automatically.

How install npm install node-gyp?

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)

Do I need to install node-gyp?

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.

How do I fix node-gyp error on Mac?

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).


1 Answers

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/

like image 146
Darn Avatar answered Sep 29 '22 18:09

Darn