安装“sse4_crc32"时出现 NPM 错误; [英] NPM error installing "sse4_crc32"
问题描述
我最初将此错误作为对不同包的依赖项,但是当我自己尝试时它也失败了.由于这是我第一次尝试安装 node.js 包,我确定我遗漏了一些东西,但是什么?
<前>$ npm install --save sse4_crc32\> sse4_crc32@3.3.0 安装/home/agam/node_modules/sse4_crc32> 节点 gyp 重建制作:进入目录'/home/agam/node_modules/sse4_crc32/build'CXX(目标)发布/obj.target/sse4_crc32/src/sse4_crc32.o在 ../src/sse4_crc32.cpp:18:0 包含的文件中:../node_modules/nan/nan.h:在构造函数‘Nan::Utf8String::Utf8String(v8::Local)’中:../node_modules/nan/nan.h:1178:27: 错误:‘REPLACE_INVALID_UTF8’不是‘v8::String’的成员v8::String::REPLACE_INVALID_UTF8;^sse4_crc32.target.mk:87: 目标Release/obj.target/sse4_crc32/src/sse4_crc32.o"的配方失败make: *** [Release/obj.target/sse4_crc32/src/sse4_crc32.o] 错误 1make:离开目录'/home/agam/node_modules/sse4_crc32/build'今天遇到了同样的问题.
我在 Node 0.10.29 上应该可以工作.升级到 Node 0.10.38 但这并没有解决问题.
我在 debian (jessy) 上运行,安装了 npm,将旧版本的 node-gyp 作为依赖项.0.2.0 我相信 npm 1.4.x.
通过 npm install -g 安装新版本的 node-gyp 解决了问题.(经过一些符号链接更改以指向新的 node-gyp).
I was initially getting this error as a dependency for a different package, but it fails when I try it on its own too. Since it's the first time I'm trying to install a node.js package, I'm sure I'm missing something, but what?
$ npm install --save sse4_crc32 \ > sse4_crc32@3.3.0 install /home/agam/node_modules/sse4_crc32 > node-gyp rebuild make: Entering directory '/home/agam/node_modules/sse4_crc32/build' CXX(target) Release/obj.target/sse4_crc32/src/sse4_crc32.o In file included from ../src/sse4_crc32.cpp:18:0: ../node_modules/nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local)’: ../node_modules/nan/nan.h:1178:27: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’ v8::String::REPLACE_INVALID_UTF8; ^ sse4_crc32.target.mk:87: recipe for target 'Release/obj.target/sse4_crc32/src/sse4_crc32.o' failed make: *** [Release/obj.target/sse4_crc32/src/sse4_crc32.o] Error 1 make: Leaving directory '/home/agam/node_modules/sse4_crc32/build'
Ran into the same issue today.
I was on Node 0.10.29 which supposedly should work. Upgraded to Node 0.10.38 but that didn't solve the problem.
I was running on debian (jessy) and there npm was installed pulling in a old version of node-gyp as a dependency. 0.2.0 I believe for npm 1.4.x.
Installing a new version of node-gyp through npm install -g solved the problem. (After some symlink changes to point to the new node-gyp).
这篇关于安装“sse4_crc32"时出现 NPM 错误;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!