【问题标题】:nan.h exception while installing AngularJS安装 AngularJS 时出现 nan.h 异常
【发布时间】:2015-12-08 15:54:50
【问题描述】:

我在 Windows 8.1 计算机上开始使用 AngularJS,但在构建项目时遇到了一些问题。

节点版本: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 ) 一次在这个解决方案中构建项目。 要启用并行构建,请添加“/m”开关。缓冲工具.cc C:\Users\MyTest\angular-phonecat\node_modules\nan\nan.h(409): 错误 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):注意:见 'v8::String' 的声明

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

我还指定为 npm 使用 VS2015 bulder。

如果我运行这个

node -e "require('nan')"

我得到 node_modules\nan

怎么了?

【问题讨论】:

  • 您能解决问题吗?

标签: angularjs node.js npm


【解决方案1】:

我的项目遇到了同样的错误。在some other question,有人建议下面的命令。它对我有用。

npm install -g automattic/socket.io

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-07-08
    • 1970-01-01
    • 2012-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-12
    相关资源
    最近更新 更多