NPM包沒有在Windows 8.1中建設 - 失敗與以下錯誤,節點程序包不能在Windows 8.1 - 缺少Microsoft.Cpp.Default.props
error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
我曾嘗試以下,
- 將環境變量
VCTargetsPath
設置爲C:\Program Files (x86)\MSBuild\12.0\
(錯誤相應地發生變化,但2012構建工具沒有Microsoft.Cpp.Default.props
)。 - 安裝根據this answer
- 完全去除2010 VisualStudio的一個的VisualStudio 2010環境(卸載,然後安裝在正確的順序),並嘗試了的VisualStudio 2012來代替,這要根據
Node-gyp
wiki - 添加註冊表項,根據this answer工作
- 使用Windows 7.1 SDK命令提示根據this answer
- 試圖運行NPM之前設置
VisualStudioVersion
根據this answer 試圖
- 試圖傳遞
--msvs_version=2012
根據this answer
無上述的工作過NPM。
我已經花了很多年了。有沒有人有一個明確的答案是有效的?
它位於C:\ Program Files(x 86)\ MSBuild \ Microsoft.Cpp \ v4.0 \ V110目錄。由VS2012安裝程序放在那裏。 VCTargetsPath需要指向那裏。 –
我也試過這個,它實際上需要沒有'V11.0'的路徑,但它仍然沒有工作... – Brendan
得到了類似的東西,但在Windows 7上使用VS 2013。爲了解決這個問題,我使用了「開發者命令提示符VS2013」運行'npm install'。 – yoneal