nan.h在安装AngularJS时出现exception

我从Windows 8.1计算机上的AngularJS开始,但有一些问题来build立该项目。

节点版本:5.1.1 NPM版本:3.5.1

运行时

npm install 

在angular-phonecat文件夹中它会在一段时间后抛出这个错误:

C:\ Users \ MyTest \ angular-phonecat \ node_modules \ ws>如果没有定义npm_config_node_gyp(节点“C:\ Users \ MyTest \ AppData \ Roaming \ npm \ node_modules \ npm \ bin \ node -gyp-bin \ … 。\ node_modules \ node-gyp \ bin \ node-gyp.js“rebuild)else(node rebuild)一次构build一个解决scheme中的项目。 要启用并行构build,请添加“/ m”开关。 bufferutil.cc C:\ Users \ MyTest \ angular-phonecat \ node_modules \ nan \ nan.h(409):error C2039:'ExternalAsciiStringResource':不是'v8 :: String'的成员[C:\ Users \ MyTest \ angular-phonecat \ node_modules \ ws \ build \ bufferutil.vcxproj] C:\ Users \ MyTest.node-gyp \ 5.1.1 \ include \ node \ v8.h(2078):note:see declaration of'v8 ::串'

我还安装了Visual Studio 2015,并打开了一个安装了几个包的C ++项目。

我也指定使用VS2015 bulder作为npm。

如果我运行这个

 node -e "require('nan')" 

我得到node_modules \ nan

哪里不对?

我的项目也有同样的错误 在其他一些问题上 ,有人build议下面的命令。 它为我工作。

 npm install -g automattic/socket.io