2016-07-07 158 views
1

玲反应母语,我得到以下错误(在Windows上)阵营本地安装错误

C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(31): 
error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers 
[C:\Projects\JustEatLife\node_modules\react-native\node_modules\ws 
\node_modules\bufferutil\build\bufferutil.vcxproj] 

我已经安装了Windows的SDK,增加了C++工具到我的VS 2015年安装的,安装Android的工作室,JAVA等等

有什么办法可以解决这个问题吗?

回答

1

我得到了同样的问题,对我来说,答案是更新npm中的节点gyb从版本3.3.1到3.4.0。

有关说明如何做到这一点,请参阅:

npm install fails with error C2373 with vs2015 update 3

如果npm i失败,请尝试npm install node-gyp您在packages.json

+0

这也为我工作的更新的版本号之后。我简化了更新node-gyp的步骤。只针对你想要的版本。例如,“npm install [email protected]”(在\ Program Files \ nodejs \ node_modules \ npm目录中)可以让您跳过编辑package.json。你会看到“ - [email protected]无效”,但“无效”仅表示该版本不是package.json中要求的版本。 – James