我一直試圖在我的本地機器上安裝PreRender.Io
進行測試。我已經安裝了Python 2.7.10。當我鍵入:無法使用npm安裝prerender - 「無法找到:CL.exe」
npm install prerender
它給出了一個錯誤:
C:\PreRender\node_modules\prerender\node_modules\phantom\node_modules\dnode\node
_modules\weak>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\
node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js"
rebuild) else (node rebuild)
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the
file specified. [C:\PreRender\node_modules\prerender\node_modules\phantom\node
_modules\dnode\node_modules\weak\build\weakref.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.1.7601
我無法找到cl.exe時,並在谷歌快速搜索似乎缺少一些的Visual C++編譯器。不過,我嘗試安裝說VC++ 2008 redistributable x86,但仍然是同樣的問題。
任何想法可能是錯誤的?操作系統是Windows 7 64位。
不知道這是同一個問題或不:http://stackoverflow.com/questions/32424622/installing-ws-with-npm-causes-error-with-node-gyp –
不真的,但是我終於設法解決了這個問題。我會發佈一個有關它的答案,以防萬一有人在同一個問題上絆倒 –