2013-07-17 186 views
1

我正在運行npm來安裝msnodesql,一個用於sql服務器驅動程序的npm庫。我正在Windows Server 2012盒子上安裝它。NPM安裝錯誤 - Msnodesql

我已經安裝了Visual C++ 2010,node-gyp和Python 2.7.x.x作爲依賴關係,並且所有這些安裝都已成功完成。

當我運行NPM安裝msnodesql,我得到一個大紅色的錯誤:

(x86)\MSBuild\Microsoft.Cpp\v4.0\Miscrosoft.Cpp.InvalidPlatform.Targets(23,7): error MSB8007: The Platform for project 'sqlserver.vcxproj' is invalid. Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Platform that doesn't exist for this project.

我的箱子是64位。在這方面根本沒有經驗,所以雖然看起來像一個平臺錯誤,但我真的不知道該怎麼做。

幫助!

回答

1

我得到了同樣的錯誤。原來我需要刪除我安裝的node.js(64位)並下載32位node.js。一旦我這樣做了,我運行了node-gyp configure,然後運行了node-gyp build,沒有發生錯誤。

+0

是否爲你工作? – gjw80