user2452057
user2452057

Reputation: 916

node-gyp build errors with Python version 27

I am trying to build an expressJs app have been trying to install "restify" to make rest calls. For some reason, the node-gyp build is throwing me an error:

Here are the versions I have: 1. node: v0.10.27 2. npm: 1.4.8 3. express: 4.0.0 4. python: 27

I have Windows 7 enterprise 64 bit Operating system.

Here is the error when I am trying to install restify, I have seen similar errors when I am trying to install nodemon and several other node module packages:

$ npm install restify

npm http GET https://registry.npmjs.org/restify
npm http 304 https://registry.npmjs.org/restify
npm http GET https://registry.npmjs.org/bunyan
npm http GET https://registry.npmjs.org/backoff
npm http GET https://registry.npmjs.org/escape-regexp-component
npm http GET https://registry.npmjs.org/csv
npm http GET https://registry.npmjs.org/assert-plus
npm http GET https://registry.npmjs.org/keep-alive-agent
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/negotiator
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/once
npm http GET https://registry.npmjs.org/dtrace-provider
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/verror
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/formidable
npm http GET https://registry.npmjs.org/deep-equal
npm http GET https://registry.npmjs.org/spdy
npm http 304 https://registry.npmjs.org/bunyan
npm http 304 https://registry.npmjs.org/assert-plus
npm http 304 https://registry.npmjs.org/backoff
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/negotiator
npm http 304 https://registry.npmjs.org/escape-regexp-component
npm http 304 https://registry.npmjs.org/csv
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/keep-alive-agent
npm http 304 https://registry.npmjs.org/once
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/deep-equal
npm http 304 https://registry.npmjs.org/http-signature
npm http 304 https://registry.npmjs.org/dtrace-provider
npm http 304 https://registry.npmjs.org/verror
npm http 304 https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/spdy
npm http GET https://registry.npmjs.org/asn1
npm http GET https://registry.npmjs.org/ctype
npm http GET https://registry.npmjs.org/extsprintf
npm http 304 https://registry.npmjs.org/ctype

> [email protected] install c:\apps\..\..\node_modules\restify\no
de_modules\dtrace-provider
> node-gyp rebuild


c:\apps\...\..\restify\node_modules\dtrace-provider>node
**"c:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\n
ode-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
 To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.  [c:\apps\trendy\trendy_ui\node_modules\restify\node_mo
dules\dtrace-provider\build\binding.sln]**
gyp ERR! build error
gyp ERR! stack Error: `C:\windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (c:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd c:\apps\trendy\trendy_ui\node_modules\restify\node_modules\dtrace-p
rovider
gyp ERR! node -v v0.10.27
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm http 304 https://registry.npmjs.org/asn1
npm http 304 https://registry.npmjs.org/extsprintf
npm http GET https://registry.npmjs.org/mv
npm http 304 https://registry.npmjs.org/mv
npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules\restify
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected])
└── [email protected]

Am I using wrong version combinations of node, npm and express? Any help would be appreciated.

I tried reverting to Python33, then I get an error message stating that node-gyp only supports python versions between2.5 - 3.

Thanks

Upvotes: 4

Views: 1023

Answers (1)

Eitan Rousso
Eitan Rousso

Reputation: 181

The error is not related to the python version.
node-gyp has lots of prerequisites in order to run on windows and requires a few installations. follow instructions here.

Upvotes: 1

Related Questions