我正在尝试构建一个expressJs应用程序一直在尝试安装" restify"打个电话。出于某种原因,node-gyp构建给我一个错误:
以下是我的版本: 1. node:v0.10.27 2. npm:1.4.8 3.表达:4.0.0 4. python:27
我有Windows 7企业版64位操作系统。
当我尝试安装restify时出现错误,我在尝试安装nodemon和其他几个节点模块包时遇到了类似的错误:
$ 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
> dtrace-provider@0.2.8 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 dtrace-provider@0.2.8
restify@2.7.0 node_modules\restify
├── assert-plus@0.1.5
├── once@1.3.0
├── tunnel-agent@0.4.0
├── deep-equal@0.0.0
├── mime@1.2.11
├── qs@0.6.6
├── escape-regexp-component@1.0.2
├── keep-alive-agent@0.0.1
├── lru-cache@2.3.1
├── negotiator@0.3.0
├── node-uuid@1.4.1
├── semver@2.2.1
├── backoff@2.3.0
├── verror@1.3.7 (extsprintf@1.0.2)
├── spdy@1.19.3
├── http-signature@0.10.0 (assert-plus@0.1.2, asn1@0.1.11, ctype@0.5.2)
├── formidable@1.0.14
├── bunyan@0.22.1 (mv@0.0.5)
└── csv@0.3.7
我是否使用了node,npm和express的错误版本组合?任何帮助,将不胜感激。
我尝试恢复到Python33,然后收到一条错误消息,指出node-gyp只支持2.5到3之间的python版本。
谢谢