luckykaiyi / nodejieba Goto Github PK
View Code? Open in Web Editor NEW"结巴"中文分词的Node.js版本
License: MIT License
"结巴"中文分词的Node.js版本
License: MIT License
对于拼音来说,细致的切分出所有成语、词语,比切分出短语更合适。例如 README 中的示例:
nodejieba.cut("南京市长江大桥");
// 目前:["南京市","长江大桥"]
// 期望:["南京", "市","长江", "大桥"]
// 亦可:["南京市","长江", "大桥"]
nodejieba.cut("南京长江大桥");
// 目前:["南京长江大桥"]
// 期望:["南京","长江", "大桥"]
如果是目前的结果,则拼音的词语库中需要保留各种短语(例如 九江长江大桥、武汉长江大桥 等)。
如果是期望的结果,则只需要保留成语、词语的拼音库即可(更进一步,只需要保留有多音字的成语、词语拼音库)。
D:\sites\api>npm install
> [email protected] install D:\sites\api\node_modules\nodejieba
> node-gyp rebuild
D:\sites\api\node_modules\nodejieba>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
gyp ERR! build error
gyp ERR! stack Error: Can't find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?
gyp ERR! stack at findMsbuild (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:122:23)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:104:11
gyp ERR! stack at F (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:78:16)
gyp ERR! stack at E (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:82:29)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:93:16
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 5.2.3790
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\sites\api\node_modules\nodejieba
gyp ERR! node -v v5.4.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1
npm WARN EPEERINVALID [email protected] requires a peer of kerberos@~0.0 but n
one was installed.
npm WARN EPEERINVALID [email protected] requires a peer of kerberos@~0.0 but n
one was installed.
可是我明明有装Visual C++ 2008 SP1 Redistributable
1.*版本一句话分词结果:
'汇通网',
'月',
'日讯',
'高盛',
'研究',
'团队',
'周五',
同一句话在2.x版本里面变成了:
'汇通网',
'月',
'日',
'讯',
'高'
'盛',
'研究',
'团队',
'周五'
加载的用户字典里面可是有 “高盛” 这个词汇的
G:\syntun>npm install -g nodejieba
npm http GET https://registry.npmjs.org/nodejieba
npm http 304 https://registry.npmjs.org/nodejieba
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
> [email protected] install C:\Users\Rambo\AppData\Roaming\npm\node_modules\nodejieba
> node-gyp rebuild
C:\Users\Rambo\AppData\Roaming\npm\node_modules\nodejieba>node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp
\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
index.cpp
nodejieba.cpp
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\utils.h(17): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 [C:\Users\
Rambo\AppData\Roam
ing\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\utils.h(17): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 [C:\Users\
Rambo\AppData\Roam
ing\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\utils.h(19): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 [C:\U
sers\Rambo\AppData
\Roaming\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\utils.h(24): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 [C:\Users\
Rambo\AppData\Roam
ing\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\utils.h(19): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 [C:\U
sers\Rambo\AppData
\Roaming\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\utils.h(24): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 [C:\Users\
Rambo\AppData\Roam
ing\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\utils.h(30): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 [C:\U
sers\Rambo\AppData
\Roaming\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\utils.h(35): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 [C:\Users\
Rambo\AppData\Roam
ing\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\utils.h(41): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 [C:\U
sers\Rambo\AppData
\Roaming\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\utils.h(30): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 [C:\U
sers\Rambo\AppData
\Roaming\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\utils.h(35): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 [C:\Users\
Rambo\AppData\Roam
ing\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\utils.h(41): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 [C:\U
sers\Rambo\AppData
\Roaming\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\cppjieba\limonp\StdExtension.hpp(13): fatal error C1083: 无法打开包括文件:“tr1/unordere
d_map”:
No such file or directory [C:\Users\Rambo\AppData\Roaming\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
c:\users\rambo\appdata\roaming\npm\node_modules\nodejieba\lib\cppjieba\limonp\StdExtension.hpp(13): fatal error C1083: 无法打开包括文件:“tr1/unordere
d_map”:
No such file or directory [C:\Users\Rambo\AppData\Roaming\npm\node_modules\nodejieba\build\nodejieba.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Rambo\AppData\Roaming\npm\node_modules\nodejieba
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the nodejieba package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls nodejieba
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "D:\\Program Files\\nodejs\\\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "nodejieba"
npm ERR! cwd G:\syntun
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! G:\syntun\npm-debug.log
npm ERR! not ok code 0
希望能支持windows
var News = mongoose.model('News', newsSchema);
News.find({}, "title date body url", function(error, docs){
nodejieba.cut("This is a test", function(wordList) {
wordList.forEach(function(word) {
console.log(word);
});
});
}
在mongoose的find函数的回调函数中使用无法分出结果。放在外面可以正常使用。
根据 README 中示例代码:
nodejieba.loadDict(
"./node_modules/nodejieba/dict/jieba.dict.utf8",
"./node_modules/nodejieba/dict/hmm_model.utf8",
"./node_modules/nodejieba/dict/user.dict.utf8");
模块 A 开发时自身没有问题,但是当第三方模块依赖 A 时就会出现路径问题:
DictTrie.hpp:124 FATAL file ./node_modules/nodejieba/dict/jieba.dict.utf8 open failed.
模块 A 需要写上完整路径才行:
nodejieba.loadDict(
__dirname + "/../node_modules/nodejieba/dict/jieba.dict.utf8",
__dirname + "/../node_modules/nodejieba/dict/hmm_model.utf8",
__dirname + "/../node_modules/nodejieba/dict/user.dict.utf8");
我觉得用户是否可以不关注词典的加载?至少是不需要关注词典的绝对路径。
说实话,路径中出现 node_modules/* 什么的好别扭。
是否可以考虑默认自动加载?
或者是否可以考虑提供几个方法加载不同词典,而不是要模块 A 指定另一个模块中的文件地址。例如:
nodejiba.loadDict(nodejieba.DEFAULT_DICT);
// 或者:
nodejieba.loadDefaultDict();
请指教:
环境 win7 64位(已更新至Windows SDK 7.1),Visual Studio 2010, [email protected], [email protected], [email protected]
安装 [email protected] 失败,疑似版本问题导致编译不成功。
这是日志文件
Error: Module did not self-register.
at Error (native)
at Object.Module._extensions..node (module.js:460:18)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (/mnt/cs2/gameServer/node_modules/nodejieba/index.js:1:79)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
你好,非常感谢你建了这个项目,我发现了一个 BUG ,当我调用 queryCut
的时候,会出现 segmentation fault
的错误,但调用 cut
的时候不会。
我的 node 版本是 v0.11.16
,操作系统是 OS X 10.10.2
。
代码如下:
(function() {
var jieba = require('nodejieba')
jieba.loadDict(
"./node_modules/nodejieba/dict/jieba.dict.utf8",
"./node_modules/nodejieba/dict/hmm_model.utf8",
"./node_modules/nodejieba/dict/user.dict.utf8"
)
jieba.queryCut('你好世界', function(wordList) {
console.log(wordList.join(' '))
})
}).call(this);
npm http GET http://r.cnpmjs.org/nodejieba
npm http 304 http://r.cnpmjs.org/nodejieba
npm http GET http://r.cnpmjs.org/nan
npm http 304 http://r.cnpmjs.org/nan
npm ERR! Error: No compatible version found: nan@'^1.2.0'
npm ERR! Valid install targets:
npm ERR! ["1.3.0","1.2.0","1.1.2","1.1.1","1.1.0","1.0.0","0.8.0","0.7.1","0.7.0","0.6.0","0.5.2","0.5.1","0.5.0","0.4.4","0.4.3","0.4.2","0.4.1","0.4.0","0.3.2","0.3.1","0.3.0","0.3.0-wip2","0.3.0-wip"]
npm ERR! at installTargetsError (/usr/local/Cellar/node/0.10.10/lib/node_modules/npm/lib/cache.js:719:10)
npm ERR! at /usr/local/Cellar/node/0.10.10/lib/node_modules/npm/lib/cache.js:641:10
npm ERR! at saved (/usr/local/Cellar/node/0.10.10/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
An extra null pointer check is not needed in functions like the following.
gitbook install 会报nodejieba出错,进入nodejieba目录 node-gyp rebuild ,然后gitbook build
[root@i-2atypla1 firstre]# npm install nodejieba
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No license field.
|
[email protected] install /root/code/firstre/node_modules/nodejieba
node-gyp rebuild
make: Entering directory /root/code/firstre/node_modules/nodejieba/build' CXX(target) Release/obj.target/nodejieba/lib/index.o In file included from /root/.node-gyp/4.2.0/include/node/node.h:42, from ../lib/utils.h:4, from ../lib/nodejieba.h:4, from ../lib/index.cpp:1: /root/.node-gyp/4.2.0/include/node/v8.h:336: 错误:expected unqualified-id before ‘using’ /root/.node-gyp/4.2.0/include/node/v8.h: In constructor ‘v8::MaybeLocal<T>::MaybeLocal()’: /root/.node-gyp/4.2.0/include/node/v8.h:353: 错误:‘nullptr’在此作用域中尚未声明 /root/.node-gyp/4.2.0/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::IsEmpty() const’: /root/.node-gyp/4.2.0/include/node/v8.h:360: 错误:‘nullptr’在此作用域中尚未声明 /root/.node-gyp/4.2.0/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const’: /root/.node-gyp/4.2.0/include/node/v8.h:364: 错误:‘nullptr’在此作用域中尚未声明 /root/.node-gyp/4.2.0/include/node/v8.h: In member function ‘bool v8::WeakCallbackInfo<T>::IsFirstPass() const’: /root/.node-gyp/4.2.0/include/node/v8.h:430: 错误:‘nullptr’在此作用域中尚未声明 /root/.node-gyp/4.2.0/include/node/v8.h: At global scope: /root/.node-gyp/4.2.0/include/node/v8.h:469: 错误:expected unqualified-id before ‘using’ /root/.node-gyp/4.2.0/include/node/v8.h: In constructor ‘v8::Global<T>::Global()’: /root/.node-gyp/4.2.0/include/node/v8.h:790: 错误:‘nullptr’在此作用域中尚未声明 /root/.node-gyp/4.2.0/include/node/v8.h: In constructor ‘v8::Global<T>::Global(v8::Global<T>&&)’: /root/.node-gyp/4.2.0/include/node/v8.h:815: 错误:‘nullptr’在此作用域中尚未声明 /root/.node-gyp/4.2.0/include/node/v8.h: In member function ‘v8::Global<T>& v8::Global<T>::operator=(v8::Global<S>&&)’: /root/.node-gyp/4.2.0/include/node/v8.h:827: 错误:‘nullptr’在此作用域中尚未声明 /root/.node-gyp/4.2.0/include/node/v8.h: At global scope: /root/.node-gyp/4.2.0/include/node/v8.h:852: 错误:expected unqualified-id before ‘using’ /root/.node-gyp/4.2.0/include/node/v8.h:1089: 错误:‘nullptr’在此作用域中尚未声明 /root/.node-gyp/4.2.0/include/node/v8.h:1095: 错误:‘nullptr’在此作用域中尚未声明 /root/.node-gyp/4.2.0/include/node/v8.h: In member function ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’: /root/.node-gyp/4.2.0/include/node/v8.h:3205: 错误:‘nullptr’在此作用域中尚未声明 /root/.node-gyp/4.2.0/include/node/v8.h: In member function ‘v8::Local<T> v8::MaybeLocal<T>::ToLocalChecked()’: /root/.node-gyp/4.2.0/include/node/v8.h:7164: 错误:‘nullptr’在此作用域中尚未声明 In file included from ../node_modules/nan/nan.h:182, from ../lib/utils.h:6, from ../lib/nodejieba.h:4, from ../lib/index.cpp:1: ../node_modules/nan/nan_maybe_43_inl.h: At global scope: ../node_modules/nan/nan_maybe_43_inl.h:13: 错误:expected unqualified-id before ‘using’ ../node_modules/nan/nan_maybe_43_inl.h:16: 错误:expected unqualified-id before ‘using’ ../node_modules/nan/nan_maybe_43_inl.h:19: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:24: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:31: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:36: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:41: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:46: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:51: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:60: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:65: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:70: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:77: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:84: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:92: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:99: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:109: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:115: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:119: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:126: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:131: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:136: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:140: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:146: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:151: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:157: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:163: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:169: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:175: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:181: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:187: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:195: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:202: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:206: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:210: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:214: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan_maybe_43_inl.h:218: 错误:expected initializer before ‘<’ token In file included from ../node_modules/nan/nan.h:187, from ../lib/utils.h:6, from ../lib/nodejieba.h:4, from ../lib/index.cpp:1: ../node_modules/nan/nan_converters.h:14: 错误:ISO C++ 不允许声明无类型的‘MaybeLocal’ ../node_modules/nan/nan_converters.h:14: 错误:expected ‘;’ before ‘<’ token ../node_modules/nan/nan_converters.h:16: 错误:ISO C++ 不允许声明无类型的‘Maybe’ ../node_modules/nan/nan_converters.h:16: 错误:expected ‘;’ before ‘<’ token ../node_modules/nan/nan_converters.h:26: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_converters.h:27: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_converters.h:28: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_converters.h:29: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_converters.h:30: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_converters.h:31: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_converters.h:32: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_converters.h:42: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_converters.h:43: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_converters.h:44: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_converters.h:45: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_converters.h:46: 错误:‘return_t’没有命名一个类型 In file included from ../node_modules/nan/nan_converters.h:59, from ../node_modules/nan/nan.h:187, from ../lib/utils.h:6, from ../lib/nodejieba.h:4, from ../lib/index.cpp:1: ../node_modules/nan/nan_converters_43_inl.h:18: 错误:‘return_t’在类‘Nan::imp::ToFactory<v8::Boolean>’中没有命名一个类型 ../node_modules/nan/nan_converters_43_inl.h:19: 错误:‘return_t’在类‘Nan::imp::ToFactory<v8::Number>’中没有命名一个类型 ../node_modules/nan/nan_converters_43_inl.h:20: 错误:‘return_t’在类‘Nan::imp::ToFactory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_converters_43_inl.h:21: 错误:‘return_t’在类‘Nan::imp::ToFactory<v8::Object>’中没有命名一个类型 ../node_modules/nan/nan_converters_43_inl.h:22: 错误:‘return_t’在类‘Nan::imp::ToFactory<v8::Integer>’中没有命名一个类型 ../node_modules/nan/nan_converters_43_inl.h:23: 错误:‘return_t’在类‘Nan::imp::ToFactory<v8::Uint32>’中没有命名一个类型 ../node_modules/nan/nan_converters_43_inl.h:24: 错误:‘return_t’在类‘Nan::imp::ToFactory<v8::Int32>’中没有命名一个类型 ../node_modules/nan/nan_converters_43_inl.h:34: 错误:‘return_t’在类‘Nan::imp::ToFactory<bool>’中没有命名一个类型 ../node_modules/nan/nan_converters_43_inl.h:35: 错误:‘return_t’在类‘Nan::imp::ToFactory<double>’中没有命名一个类型 ../node_modules/nan/nan_converters_43_inl.h:36: 错误:‘return_t’在类‘Nan::imp::ToFactory<long int>’中没有命名一个类型 ../node_modules/nan/nan_converters_43_inl.h:37: 错误:‘return_t’在类‘Nan::imp::ToFactory<unsigned int>’中没有命名一个类型 ../node_modules/nan/nan_converters_43_inl.h:38: 错误:‘return_t’在类‘Nan::imp::ToFactory<int>’中没有命名一个类型 In file included from ../node_modules/nan/nan.h:188, from ../lib/utils.h:6, from ../lib/nodejieba.h:4, from ../lib/index.cpp:1: ../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Integer]’: ../node_modules/nan/nan_new.h:21: 错误:对‘To(v8::Local<v8::Integer>&)’的调用没有匹配的函数 ../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Int32]’: ../node_modules/nan/nan_new.h:28: 错误:对‘To(v8::Local<v8::Integer>&)’的调用没有匹配的函数 ../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Uint32]’: ../node_modules/nan/nan_new.h:35: 错误:对‘To(v8::Local<v8::Integer>&)’的调用没有匹配的函数 ../node_modules/nan/nan_new.h: At global scope: ../node_modules/nan/nan_new.h:43: 错误:ISO C++ 不允许声明无类型的‘MaybeLocal’ ../node_modules/nan/nan_new.h:43: 错误:expected ‘;’ before ‘<’ token ../node_modules/nan/nan_new.h:75: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_new.h:141: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_new.h:147: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_new.h:148: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_new.h:160: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_new.h:161: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_new.h:162: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_new.h:163: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_new.h:165: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_new.h:166: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_new.h:182: 错误:‘return_t’没有命名一个类型 ../node_modules/nan/nan_new.h:183: 错误:‘return_t’没有命名一个类型 In file included from ../node_modules/nan/nan_new.h:189, from ../node_modules/nan/nan.h:188, from ../lib/utils.h:6, from ../lib/nodejieba.h:4, from ../lib/index.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h:56: 错误:‘return_t’在类‘Nan::imp::Factory<v8::Date>’中没有命名一个类型 ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Function> Nan::imp::Factory<v8::Function>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)’: ../node_modules/nan/nan_implementation_12_inl.h:90: 错误:‘NewInstance’在此作用域中尚未声明 ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::FunctionTemplate> Nan::imp::Factory<v8::FunctionTemplate>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>, v8::Local<v8::Signature>)’: ../node_modules/nan/nan_implementation_12_inl.h:118: 错误:‘NewInstance’在此作用域中尚未声明 ../node_modules/nan/nan_implementation_12_inl.h: At global scope: ../node_modules/nan/nan_implementation_12_inl.h:197: 错误:‘return_t’在类‘Nan::imp::Factory<v8::RegExp>’中没有命名一个类型 ../node_modules/nan/nan_implementation_12_inl.h:216: 错误:‘return_t’在类‘Nan::imp::Factory<v8::Script>’中没有命名一个类型 ../node_modules/nan/nan_implementation_12_inl.h:222: 错误:‘return_t’在类‘Nan::imp::Factory<v8::Script>’中没有命名一个类型 ../node_modules/nan/nan_implementation_12_inl.h:254: 错误:‘return_t’在类‘Nan::imp::Factory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_implementation_12_inl.h:262: 错误:‘return_t’在类‘Nan::imp::Factory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_implementation_12_inl.h:268: 错误:‘return_t’在类‘Nan::imp::Factory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_implementation_12_inl.h:275: 错误:‘return_t’在类‘Nan::imp::Factory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_implementation_12_inl.h:281: 错误:‘return_t’在类‘Nan::imp::Factory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_implementation_12_inl.h:286: 错误:‘return_t’在类‘Nan::imp::Factory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_implementation_12_inl.h:347: 错误:‘return_t’在类‘Nan::imp::Factory<v8::UnboundScript>’中没有命名一个类型 ../node_modules/nan/nan_implementation_12_inl.h:354: 错误:‘return_t’在类‘Nan::imp::Factory<v8::UnboundScript>’中没有命名一个类型 In file included from ../node_modules/nan/nan.h:188, from ../lib/utils.h:6, from ../lib/nodejieba.h:4, from ../lib/index.cpp:1: ../node_modules/nan/nan_new.h:291: 错误:‘return_t’在类‘Nan::imp::Factory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_new.h:297: 错误:‘return_t’在类‘Nan::imp::Factory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_new.h:303: 错误:‘return_t’在类‘Nan::imp::Factory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_new.h:309: 错误:‘return_t’在类‘Nan::imp::Factory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_new.h:315: 错误:‘return_t’在类‘Nan::imp::Factory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_new.h:321: 错误:‘return_t’在类‘Nan::imp::Factory<v8::String>’中没有命名一个类型 ../node_modules/nan/nan_new.h:327: 错误:‘return_t’在类‘Nan::imp::Factory<v8::RegExp>’中没有命名一个类型 In file included from ../lib/utils.h:6, from ../lib/nodejieba.h:4, from ../lib/index.cpp:1: ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::Error(const char*)’: ../node_modules/nan/nan.h:639: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In function ‘void Nan::ThrowError(const char*)’: ../node_modules/nan/nan.h:639: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::RangeError(const char*)’: ../node_modules/nan/nan.h:640: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In function ‘void Nan::ThrowRangeError(const char*)’: ../node_modules/nan/nan.h:640: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::ReferenceError(const char*)’: ../node_modules/nan/nan.h:641: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In function ‘void Nan::ThrowReferenceError(const char*)’: ../node_modules/nan/nan.h:641: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::SyntaxError(const char*)’: ../node_modules/nan/nan.h:642: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In function ‘void Nan::ThrowSyntaxError(const char*)’: ../node_modules/nan/nan.h:642: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::TypeError(const char*)’: ../node_modules/nan/nan.h:643: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In function ‘void Nan::ThrowTypeError(const char*)’: ../node_modules/nan/nan.h:643: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: At global scope: ../node_modules/nan/nan.h:651: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan.h:673: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan.h:689: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan.h:702: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan.h:719: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan.h:725: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan.h:733: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan.h:740: 错误:expected initializer before ‘<’ token ../node_modules/nan/nan.h:746: 错误:expected initializer before ‘<’ token /root/.node-gyp/4.2.0/include/node/v8.h: In member function ‘void Nan::Callback::SetFunction(const v8::Local<v8::Function>&)’: /root/.node-gyp/4.2.0/include/node/v8.h:3021: 错误:依赖参数的查找找到了‘class v8::Set’ ../node_modules/nan/nan.h:1366: 错误: 在调用‘Set’时 ../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)’: ../node_modules/nan/nan.h:1488: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const’: ../node_modules/nan/nan.h:1506: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In member function ‘virtual void Nan::AsyncWorker::HandleErrorCallback()’: ../node_modules/nan/nan.h:1540: 错误:对‘New(const char*)’的调用没有匹配的函数 ../node_modules/nan/nan.h: In function ‘void Nan::SetMethod(const T&, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’: ../node_modules/nan/nan.h:1829: 错误:‘GetFunction’的实参不依赖模板参数,所以‘GetFunction’的声明必须可用 ../node_modules/nan/nan.h:1829: 附注:(如果您使用‘-fpermissive’,G++ 会接受您的代码,但是允许使用未定义的名称是不建议使用的风格) ../node_modules/nan/nan.h:1830: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In function ‘void Nan::SetPrototypeMethod(v8::Local<v8::FunctionTemplate>, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’: ../node_modules/nan/nan.h:1842: 错误:‘GetFunction’在此作用域中尚未声明 ../node_modules/nan/nan.h:1843: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’: ../node_modules/nan/nan.h:1868: 错误:‘NewInstance’在此作用域中尚未声明 ../node_modules/nan/nan.h: In function ‘bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’: ../node_modules/nan/nan.h:1911: 错误:‘NewInstance’在此作用域中尚未声明 ../node_modules/nan/nan.h: In function ‘void Nan::SetNamedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)’: ../node_modules/nan/nan.h:1959: 错误:‘NewInstance’在此作用域中尚未声明 ../node_modules/nan/nan.h: In function ‘void Nan::SetIndexedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)’: ../node_modules/nan/nan.h:2029: 错误:‘NewInstance’在此作用域中尚未声明 In file included from ../lib/utils.h:6, from ../lib/nodejieba.h:4, from ../lib/index.cpp:1: ../node_modules/nan/nan.h: In function ‘void Nan::Export(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’: ../node_modules/nan/nan.h:2090: 错误:对‘New(const char*&)’的调用没有匹配的函数 ../node_modules/nan/nan.h:2091: 错误:‘GetFunction’在此作用域中尚未声明 /root/.node-gyp/4.2.0/include/node/v8.h:3021: 错误:依赖参数的查找找到了‘class v8::Set’ ../node_modules/nan/nan.h:2091: 错误: 在调用‘Set’时 ../node_modules/nan/nan.h: In constructor ‘Nan::Tap::Tap(v8::Local<v8::Value>)’: ../node_modules/nan/nan.h:2098: 错误:对‘To(v8::Local<v8::Value>&)’的调用没有匹配的函数 ../node_modules/nan/nan.h: In member function ‘void Nan::Tap::ok(bool, const char*)’: ../node_modules/nan/nan.h:2111: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 ../node_modules/nan/nan.h: In member function ‘void Nan::Tap::pass(const char*)’: ../node_modules/nan/nan.h:2117: 错误:‘class v8::Local<v8::Boolean>’没有名为‘ToLocalChecked’的成员 In file included from ../lib/nodejieba.h:4, from ../lib/index.cpp:1: ../lib/utils.h: In function ‘void WrapVector(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, v8::Local<v8::Array>&)’: ../lib/utils.h:19: 错误:对‘New(const char*)’的调用没有匹配的函数 ../lib/utils.h: In function ‘void WrapPairVector(std::vector<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, double>, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, double> > >&, v8::Local<v8::Array>&)’: ../lib/utils.h:30: 错误:对‘New(const char*)’的调用没有匹配的函数 ../lib/utils.h: In function ‘void WrapPairVector(std::vector<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&, v8::Local<v8::Array>&)’: ../lib/utils.h:41: 错误:对‘New(const char*)’的调用没有匹配的函数 ../lib/index.cpp: At global scope: ../lib/index.cpp:3: 错误:变量或字段‘init’声明为 void ../lib/index.cpp:3: 错误:‘Handle’在此作用域中尚未声明 ../lib/index.cpp:3: 错误:expected primary-expression before ‘>’ token ../lib/index.cpp:3: 错误:‘exports’在此作用域中尚未声明 ../lib/index.cpp:16: 错误:‘init’在此作用域中尚未声明 ../lib/index.cpp:16: 错误:‘node::node_module’的初始值设定项太多 make: *** [Release/obj.target/nodejieba/lib/index.o] 错误 1 make: Leaving directory
/root/code/firstre/node_modules/nodejieba/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.32-504.30.3.el6.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/code/firstre/node_modules/nodejieba
gyp ERR! node -v v4.2.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Linux 2.6.32-504.30.3.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "nodejieba"
npm ERR! node v4.2.0
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the nodejieba package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls nodejieba
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/code/firstre/npm-debug.log
我觉得分词模块更多的应该还是是计算而不是 IO 上,因此『非阻塞式』真的是非阻塞的么?还是只是为了『遵循』Node 很多场景都使用非阻塞式的 API ?
如果是真的非阻塞,请多指教 :)
怎么查词性啊?
Hi,当调用 cut function 时,如果句子里带有 emoji 表情时,表情后面的部分不会被处理。
'use strict';
var segment = require('nodejieba');
var content = '今天天气很好,🙋 我们去郊游。'
var result = segment.cut(content);
console.log('origin', content);
console.log('result', result);
Result:
origin 今天天气很好,🙋 我们去郊游。
result [ '今天天气', '很', '好', ',' ]
Thanks
[root@pan miniyunjs]# npm --registry=http://r.cnpmjs.org install nodejieba
npm WARN engine [email protected]: wanted: {"node":"0.10.x"} (current: {"node":"2.2.1","npm":"2.11.0"})
/
[email protected] install /home/data/miniyunjs/node_modules/nodejieba
node-gyp rebuild
make: Entering directory /home/data/miniyunjs/node_modules/nodejieba/build' CXX(target) Release/obj.target/nodejieba/lib/index.o In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:66, from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/char_traits.h:41, from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/string:42, from ../node_modules/nan/nan.h:37, from ../lib/utils.h:6, from ../lib/nodejieba.h:4, from ../lib/index.cpp:1: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_pair.h: In constructor ‘std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = size_t&, _U2 = long int, _T1 = long unsigned int, _T2 = const CppJieba::DictUnit*]’: ../lib/CppJieba/Trie.hpp:101: instantiated from here /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_pair.h:90: 错误:从类型‘long int’到类型‘const CppJieba::DictUnit*’的转换无效 make: *** [Release/obj.target/nodejieba/lib/index.o] 错误 1 make: Leaving directory
/home/data/miniyunjs/node_modules/nodejieba/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/data/iojs-v2.2.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:199:12)
gyp ERR! System Linux 2.6.32-504.16.2.el6.x86_64
gyp ERR! command "/home/data/iojs-v2.2.1-linux-x64/bin/iojs" "/home/data/iojs-v2.2.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/data/miniyunjs/node_modules/nodejieba
gyp ERR! node -v v2.2.1
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Linux 2.6.32-504.16.2.el6.x86_64
npm ERR! argv "/home/data/iojs-v2.2.1-linux-x64/bin/iojs" "/usr/local/bin/npm" "--registry=http://r.cnpmjs.org" "install" "nodejieba"
npm ERR! node v2.2.1
npm ERR! npm v2.11.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the nodejieba package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls nodejieba
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/data/miniyunjs/npm-debug.log
看了下.node-gyp/4.2.2目录,common.gypi文件在4.2.2/include/node文件夹中
环境:Ubuntu 14.04,下载安装了nodejieba最新版本。require并且load了nodejieba。
重现步骤:输入 “7天或者15天”,然后调用 cut 函数,返回的数组里,仍然出现 “或者” 这个词组。查看了一下缺省的stopWordDict,发现里面是有 “或者” 词组,但是为什么 cut 出来的结果里,仍然包含 “或者” 呢?
184 error node -v v0.10.29
185 error npm -v 1.4.16
186 error code ELIFECYCLE
187 verbose exit [ 1, true ]
npm WARN engine [email protected]: wanted: {"node":"0.10.x"} (current: {"node":"0.11.13","npm":"2.1.5"})
\
> [email protected] install /Users/vfasky/git/kotenei/node_modules/nodejieba
> node-gyp rebuild
CXX(target) Release/obj.target/segment/src/segment.o
In file included from ../src/segment.cpp:1:
In file included from ../src/mix_segment.h:3:
../src/utils.h:16:24: error: cannot initialize a parameter of type
'v8::Isolate *' with an rvalue of type 'size_type' (aka 'unsigned long')
array = Array::New(ov.size());
^~~~~~~~~
/Users/vfasky/.node-gyp/0.11.13/deps/v8/include/v8.h:2486:36: note: passing
argument to parameter 'isolate' here
static Local<Array> New(Isolate* isolate, int length = 0);
^
In file included from ../src/segment.cpp:1:
In file included from ../src/mix_segment.h:3:
../src/utils.h:18:31: error: no member named 'New' in 'v8::String'
array->Set(i, String::New(ov[i].c_str()));
~~~~~~~~^
../src/utils.h:23:24: error: cannot initialize a parameter of type
'v8::Isolate *' with an rvalue of type 'size_type' (aka 'unsigned long')
array = Array::New(ov.size());
^~~~~~~~~
/Users/vfasky/.node-gyp/0.11.13/deps/v8/include/v8.h:2486:36: note: passing
argument to parameter 'isolate' here
static Local<Array> New(Isolate* isolate, int length = 0);
^
In file included from ../src/segment.cpp:1:
In file included from ../src/mix_segment.h:3:
../src/utils.h:25:31: error: no member named 'New' in 'v8::String'
array->Set(i, String::New((ov[i].first + ":" + ov[i].second).c_str()));
~~~~~~~~^
4 errors generated.
make: *** [Release/obj.target/segment/src/segment.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1046:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/vfasky/git/kotenei/node_modules/nodejieba
gyp ERR! node -v v0.11.13
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/lib/node_modules/cnpm/node_modules/.bin/npm" "--userconfig=/Users/vfasky/.cnpmrc" "--disturl=https://npm.taobao.org/dist" "--cache=/Users/vfasky/.npm/.cache_cnpm" "--registry=https://registry.npm.taobao.org" "install" "nodejieba"
npm ERR! node v0.11.13
npm ERR! npm v2.1.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the nodejieba package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls nodejieba
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/vfasky/git/kotenei/npm-debug.log
]
CXX(target) Release/obj.target/segment/src/segment.o
In file included from ../src/segment.cpp:1:
In file included from ../src/mix_segment.h:4:
In file included from ../src/utils.h:6:
In file included from ../node_modules/nan/nan.h:74:
In file included from ../node_modules/nan/nan_new.h:190:
../node_modules/nan/nan_implementation_12_inl.h:181:66: error: too many arguments to
function call, expected at most 2, have 4
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~
/Users/fundon/.node-gyp/2.0.0/deps/v8/include/v8.h:4188:3: note: 'New' declared here
static Local<Signature> New(
^
1 error generated.
make: *** [Release/obj.target/segment/src/segment.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/fundon/.nvm/versions/io.js/v2.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:169:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1009:12)
gyp ERR! System Darwin 14.4.0
gyp ERR! command "/Users/fundon/.nvm/versions/io.js/v2.0.0/bin/iojs" "/Users/fundon/.nvm/versions/io.js/v2.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/fundon/dev/xxx/xyyy/node_modules/pinyin/node_modules/nodejieba
gyp ERR! node -v v2.0.0
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm info [email protected] Failed to exec install script
npm ERR! Darwin 14.4.0
npm ERR! argv "/Users/fundon/.nvm/versions/io.js/v2.0.0/bin/iojs" "/Users/fundon/.nvm/versions/io.js/v2.0.0/bin/npm" "i" "pinyin@latest" "--save-dev" "-d"
npm ERR! node v2.0.0
npm ERR! npm v2.9.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the nodejieba package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls nodejieba
npm ERR! There is likely additional logging output above.
npm info preuninstall [email protected]
C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliNot
ifyHook2': redefinition; different type modifiers [D:\mycompany\mycompany2\myproduct\node_modules\nodejieba\build\nodej
ieba.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNot
ifyHook2'
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\mycompany\mycompany2\myproduct\node_modules\nodejieba
gyp ERR! node -v v5.6.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: node-gyp rebuild
npm WARN install:[email protected] Exit status 1
[ { word: '红掌', tag: 'x' },
{ word: '拨', tag: 'x' },
{ word: '清波', tag: 'x' } ]
In my test, it always returns x.
你好,想回報一個問題。
我的環境為:
npm install 時出現了以下的錯誤訊息:
npm WARN engine [email protected]: wanted: {"node":"0.10.x"} (current: {"node":"1.3.0","npm":"2.5.1"})
/
> [email protected] install /Users/mike820324/.nvm/versions/io.js/v1.3.0/lib/node_modules/nodejieba
> node-gyp rebuild
child_process: customFds option is deprecated, use stdio instead.
CXX(target) Release/obj.target/segment/src/segment.o
In file included from ../src/segment.cpp:1:
In file included from ../src/mix_segment.h:5:
In file included from ../src/CppJieba/MixSegment.hpp:5:
In file included from ../src/CppJieba/MPSegment.hpp:8:
In file included from ../src/CppJieba/DictTrie.hpp:11:
In file included from ../src/CppJieba/Limonp/StringUtil.hpp:24:
../src/CppJieba/Limonp/StdExtension.hpp:7:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^
1 error generated.
我嘗試使用 node-gyp 來編譯,一樣出現上面的錯誤訊息。
但是如果我將出問題的檔案 src/CppJieba/Limonp/StringUtil.hpp 稍作修改,
便可以正常在 iojs v1.3.0 上面編譯了。
以下是我修改的部分:
原始的程式碼
#if(__cplusplus == 201103L)
#include <unordered_map>
#include <unordered_set>
#else
#include <tr1/unordered_map>
#include <tr1/unordered_set>
namespace std
{
using std::tr1::unordered_map;
using std::tr1::unordered_set;
}
#endif
修改的程式碼
#ifdef __APPLE__
#include <tr1/unordered_map>
#include <tr1/unordered_set>
namespace std
{
using std::tr1::unordered_map;
using std::tr1::unordered_set;
}
#elif(__cplusplus == 201103L)
#include <unordered_map>
#include <unordered_set>
#else
#include <tr1/unordered_map>
#include <tr1/unordered_set>
namespace std
{
using std::tr1::unordered_map;
using std::tr1::unordered_set;
}
#endif
由於對c++不熟,而且才剛接觸nodejs沒多久,不確定這是不是正確的改法,等等送一個Pull Request給你。謝謝
> [email protected] install D:\------\node_modules\nodejieba
> node-gyp rebuild
D:\------\node_modules\nodejieba>if not defined npm_config_node_gyp (node "C:\Users\------\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\
..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
在這個方案中一次建置一個專案。若要啟用平行組建,請加入 "/m" 參數。
index.cpp
nodejieba.cpp
d:\------\node_modules\nodejieba\lib\utils.h(19): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data (compiling
source file ..\lib\index.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\lib\utils.h(19): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data (compiling
source file ..\lib\nodejieba.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\lib\utils.h(35): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data (compiling
source file ..\lib\index.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\lib\utils.h(35): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data (compiling
source file ..\lib\nodejieba.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\lib\utils.h(51): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data (compiling
source file ..\lib\index.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\lib\utils.h(51): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data (compiling
source file ..\lib\nodejieba.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nan\nan_new.h(208): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data (compiling source file
..\lib\index.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\lib\utils.h(17): note: see reference to function template instantiation 'v8::Local<v8::Array> Nan::New<v8::Array,un
signed __int64>(A0)' being compiled
with
[
A0=unsigned __int64
] (compiling source file ..\lib\index.cpp)
d:\------\node_modules\nodejieba\deps\cppjieba\Unicode.hpp(141): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of d
ata (compiling source file ..\lib\nodejieba.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\deps\cppjieba\SegmentBase.hpp : warning C4819: The file contains a character that cannot be represented in the curren
t code page (950). Save the file in Unicode format to prevent data loss (compiling source file ..\lib\nodejieba.cpp) [D:\------\node_modules\nodejieba
\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\deps\cppjieba\SegmentBase.hpp(11): error C2001: newline in constant (compiling source file ..\lib\nodejieba.cpp) [D:\
------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\deps\cppjieba\SegmentBase.hpp(13): error C2143: syntax error: missing ';' before 'using namespace' (compiling source
file ..\lib\nodejieba.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\deps\cppjieba\FullSegment.hpp(76): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data (comp
iling source file ..\lib\nodejieba.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\deps\cppjieba\SegmentTagged.hpp(8): warning C4099: 'cppjieba::DictTrie': type name first seen using 'class' now seen
using 'struct' (compiling source file ..\lib\nodejieba.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\deps\cppjieba\DictTrie.hpp(27): note: see declaration of 'cppjieba::DictTrie' (compiling source file ..\lib\nodejie
ba.cpp)
d:\------\node_modules\nodejieba\deps\cppjieba\SegmentTagged.hpp(19): warning C4099: 'cppjieba::DictTrie': type name first seen using 'class' now seen
using 'struct' (compiling source file ..\lib\nodejieba.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\deps\cppjieba\SegmentTagged.hpp(8): note: see declaration of 'cppjieba::DictTrie' (compiling source file ..\lib\nod
ejieba.cpp)
d:\------\node_modules\nodejieba\deps\cppjieba\HMMSegment.hpp(162): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data (comp
iling source file ..\lib\nodejieba.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
d:\------\node_modules\nodejieba\deps\cppjieba\HMMSegment.hpp(178): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of
data (compiling source file ..\lib\nodejieba.cpp) [D:\------\node_modules\nodejieba\build\nodejieba.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\------\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\------\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.j
s" "rebuild"
gyp ERR! cwd D:\------\node_modules\nodejieba
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\------\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "i" "-std=c++11"
npm ERR! node v6.2.2
npm ERR! npm v3.8.7
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nodejieba package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs nodejieba
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls nodejieba
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
excute post install scripts...
[[email protected]] scripts.install: "node-gyp rebuild" at .\node_modules.npminstall\nodejieba\2.2.2\nodejieba
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
index.cpp
nodejieba.cpp
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\lib\utils.h(19): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (..\lib\nodejieba.cpp) [C:\Users\Administrator\WebstormProjects\crawl
er\node_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\lib\utils.h(19): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (..\lib\index.cpp) [C:\Users\Administrator\WebstormProjects\crawler\n
ode_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\lib\utils.h(35): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (..\lib\index.cpp) [C:\Users\Administrator\WebstormProjects\crawler\n
ode_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\lib\utils.h(35): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (..\lib\nodejieba.cpp) [C:\Users\Administrator\WebstormProjects\crawl
er\node_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\lib\utils.h(51): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (..\lib\index.cpp) [C:\Users\Administrator\WebstormProjects\crawler\n
ode_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\lib\utils.h(51): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (..\lib\nodejieba.cpp) [C:\Users\Administrator\WebstormProjects\crawl
er\node_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nan\2.3.5\nan\nan_new.h(208): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 (..\lib\index.cpp) [C:\Users\Administrator\WebstormProjects\crawler\node_modules.npmin
stall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\lib\utils.h(17): 参见对正在编译的函数 模板 实例化“v8::Localv8::Array Nan::New<v8::Array,unsigned __int64>(A0)”的引用
with
[
A0=unsigned __int64
]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\deps\cppjieba\Unicode.hpp(141): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (..\lib\nodejieba.cpp) [C:\Users\Administrator\Webstor
mProjects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\deps\cppjieba\SegmentBase.hpp : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (..\lib\nodejieba.cpp) [C:\Users\Admin
istrator\WebstormProjects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\deps\cppjieba\SegmentBase.hpp(11): error C2001: 常量中有换行符 (..\lib\nodejieba.cpp) [C:\Users\Administrator\WebstormProjects\crawler\node_modu
les.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\deps\cppjieba\SegmentBase.hpp(13): error C2143: 语法错误 : 缺少“;”(在“using”的前面) (..\lib\nodejieba.cpp) [C:\Users\Administrator\WebstormProjects
\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\deps\cppjieba\FullSegment.hpp(76): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据 (..\lib\nodejieba.cpp) [C:\Users\Administrator\WebstormPr
ojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\deps\cppjieba\SegmentTagged.hpp(8): warning C4099: “cppjieba::DictTrie”: 类型名称以前使用“class”现在使用的是“struct” (..\lib\nodejieba.cpp) [C:\Users\A
dministrator\WebstormProjects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\deps\cppjieba\DictTrie.hpp(27) : 参见“cppjieba::DictTrie”的声明
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\deps\cppjieba\SegmentTagged.hpp(19): warning C4099: “cppjieba::DictTrie”: 类型名称以前使用“class”现在使用的是“struct” (..\lib\nodejieba.cpp) [C:\Users
Administrator\WebstormProjects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\deps\cppjieba\DictTrie.hpp(27) : 参见“cppjieba::DictTrie”的声明
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\deps\cppjieba\HMMSegment.hpp(162): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据 (..\lib\nodejieba.cpp) [C:\Users\Administrator\WebstormPr
ojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
c:\users\administrator\webstormprojects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\deps\cppjieba\HMMSegment.hpp(178): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 (..\lib\nodejieba.cpp) [C:\Users\Administrator\Webstorm
Projects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba\build\nodejieba.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\nodejs\node-global\node_modules\cnpm\node_modules\npminstall\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "D:\nodejs\node.exe" "D:\nodejs\node-global\node_modules\cnpm\node_modules\npminstall\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Administrator\WebstormProjects\crawler\node_modules.npminstall\nodejieba\2.2.2\nodejieba
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
Error: post install error, please remove node_modules before retry!
Run "C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
Error: post install error, please remove node_modules before retry!
Run "C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
at ChildProcess. (D:\nodejs\node-global\node_modules\cnpm\node_modules\npminstall\node_modules\runscript\index.js:67:21)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
freebsd 10.1
nodejs v0.11.16
npm 2.14.4
部分日志是这样的:
node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | freebsd | x64
gyp info spawn python2
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/www/xiongzhanghao.com/node_modules/nodejieba/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.node-gyp/0.11.16/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/0.11.16',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/www/xiongzhanghao.com/node_modules/nodejieba',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn gmake
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gmake: Entering directory '/www/xiongzhanghao.com/node_modules/nodejieba/build'
CXX(target) Release/obj.target/nodejieba/lib/index.o
In file included from ../lib/index.cpp:1:
In file included from ../lib/nodejieba.h:5:
In file included from ../lib/CppJieba/Application.hpp:4:
In file included from ../lib/CppJieba/QuerySegment.hpp:8:
In file included from ../lib/CppJieba/DictTrie.hpp:11:
In file included from ../lib/CppJieba/limonp/StringUtil.hpp:24:
../lib/CppJieba/limonp/StdExtension.hpp:19:12: error: no member named 'tr1' in namespace 'std'
using std::tr1::unordered_map;
~~~~~^
../lib/CppJieba/limonp/StdExtension.hpp:20:12: error: no member named 'tr1' in namespace 'std'
using std::tr1::unordered_set;
~~~~~^
2 errors generated.
nodejieba.target.mk:91: recipe for target 'Release/obj.target/nodejieba/lib/index.o' failed
gmake: *** [Release/obj.target/nodejieba/lib/index.o] Error 1
gmake: Leaving directory '/www/xiongzhanghao.com/node_modules/nodejieba/build'
gyp ERR! build error
gyp ERR! stack Error: gmake
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System FreeBSD 10.1-RELEASE
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /www/xiongzhanghao.com/node_modules/nodejieba
gyp ERR! node -v v0.11.16
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok
npm info [email protected] Failed to exec install script
npm ERR! FreeBSD 10.1-RELEASE
npm ERR! argv "node" "/usr/local/bin/npm" "install" "nodejieba" "-d"
npm ERR! node v0.11.16
npm ERR! npm v2.14.4
npm ERR! code ELIFECYCLE
原 jieba
分词中有个add_word
可以在运行中动态加词,希望能把这个API放出来。
另外现在的 .load
函数必须一次性添加五个dict,不太合理吧。
错误如下:
[email protected] install /dtedu/node_modules/nodejieba
node-gyp rebuild
make: Entering directory /dtedu/node_modules/nodejieba/build' CXX(target) Release/obj.target/nodejieba/lib/index.o make: g++:命令未找到 make: *** [Release/obj.target/nodejieba/lib/index.o] 错误 127 make: Leaving directory
/dtedu/node_modules/nodejieba/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/dtedu/node-v0.12.10-linux-x64/lib/node_modules/cnpm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1075:12)
gyp ERR! System Linux 2.6.32-431.el6.x86_64
gyp ERR! command "node" "/dtedu/node-v0.12.10-linux-x64/lib/node_modules/cnpm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /dtedu/node_modules/nodejieba
gyp ERR! node -v v0.12.10
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Linux 2.6.32-431.el6.x86_64
npm ERR! argv "node" "/dtedu/node-v0.12.10-linux-x64/lib/node_modules/cnpm/node_modules/.bin/npm" "--userconfig=/root/.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--cache=/root/.cnpm" "--registry=https://registry.npm.taobao.org" "--node-gyp=/dtedu/node-v0.12.10-linux-x64/lib/node_modules/cnpm/node_modules/node-gyp/bin/node-gyp.js" "install" "nodejieba"
npm ERR! node v0.12.10
npm ERR! npm v2.14.21
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the nodejieba package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs nodejieba
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls nodejieba
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /dtedu/jieba/npm-debug.log
请求作者帮忙解决下
Windows 8.1 上 使用 visual 2015 编译不过
C:\Users\honghe>cnpm install nodejieba
|
> [email protected] install C:\Users\honghe\node_modules\nodejieba
> node-gyp rebuild
C:\Users\honghe\node_modules\nodejieba>if not defined npm_config_node_gyp (node
"C:\Users\honghe\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\bin\node
-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node C:\
Users\honghe\AppData\Roaming\npm\node_modules\cnpm\node_modules\pangyp\bin\node-
gyp.js rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available too
ls versions are "14.0", "4.0".
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\honghe\AppData\Roaming\npm\n
ode_modules\cnpm\node_modules\pangyp\lib\build.js:271:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Users\\honghe\\AppData\\Roaming\\npm\\node_modules\
\cnpm\\node_modules\\pangyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\honghe\node_modules\nodejieba
gyp ERR! node -v v0.12.5
gyp ERR! pangyp -v v2.1.0
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "node" "C:\\Users\\honghe\\AppData\\Roaming\\npm\\node_modules\\cn
pm\\node_modules\\npm\\bin\\npm-cli.js" "--userconfig=C:\\Users\\honghe\\.cnpmrc
" "--disturl=https://npm.taobao.org/mirrors/node" "--cache=C:\\Users\\honghe\\.c
npm" "--registry=https://registry.npm.taobao.org" "--node-gyp=C:\\Users\\honghe\
\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\pangyp\\bin\\node-gyp.
js" "install" "nodejieba"
npm ERR! node v0.12.5
npm ERR! npm v2.13.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the nodejieba package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls nodejieba
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\honghe\npm-debug.log
npm-debug.log文件内容:
0 info it worked if it ends with ok
1 verbose cli [ 'node',
1 verbose cli 'C:\\Users\\honghe\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli '--userconfig=C:\\Users\\honghe\\.cnpmrc',
1 verbose cli '--disturl=https://npm.taobao.org/mirrors/node',
1 verbose cli '--cache=C:\\Users\\honghe\\.cnpm',
1 verbose cli '--registry=https://registry.npm.taobao.org',
1 verbose cli '--node-gyp=C:\\Users\\honghe\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\pangyp\\bin\\node-gyp.js',
1 verbose cli 'install',
1 verbose cli 'nodejieba' ]
2 info using [email protected]
3 info using [email protected]
4 verbose config Skipping project config: C:\Users\honghe/.npmrc. (matches userconfig)
5 verbose install initial load of C:\Users\honghe\package.json
6 verbose installManyTop reading scoped package data from C:\Users\honghe\node_modules\bower\package.json
7 verbose installManyTop reading scoped package data from C:\Users\honghe\node_modules\nrm\package.json
8 info package.json [email protected] No license field.
9 verbose readDependencies loading dependencies from C:\Users\honghe\package.json
10 silly cache add args [ 'nodejieba', null ]
11 verbose cache add spec nodejieba
12 silly cache add parsed spec { raw: 'nodejieba',
12 silly cache add scope: null,
12 silly cache add name: 'nodejieba',
12 silly cache add rawSpec: '',
12 silly cache add spec: '*',
12 silly cache add type: 'range' }
13 silly addNamed nodejieba@*
14 verbose addNamed "*" is a valid semver range for nodejieba
15 silly addNameRange { name: 'nodejieba', range: '*', hasData: false }
16 silly mapToRegistry name nodejieba
17 silly mapToRegistry using default registry
18 silly mapToRegistry registry https://registry.npm.taobao.org/
19 silly mapToRegistry uri https://registry.npm.taobao.org/nodejieba
20 verbose addNameRange registry:https://registry.npm.taobao.org/nodejieba not in flight; fetching
21 verbose request uri https://registry.npm.taobao.org/nodejieba
22 verbose request no auth needed
23 info attempt registry request try #1 at 14:30:10
24 verbose request id f5d9bfb7e88d5f9a
25 verbose etag "1436454811000"
26 http request GET https://registry.npm.taobao.org/nodejieba
27 http 304 https://registry.npm.taobao.org/nodejieba
28 silly get cb [ 304,
28 silly get { server: 'nginx/1.1.19',
28 silly get date: 'Mon, 27 Jul 2015 06:30:12 GMT',
28 silly get connection: 'keep-alive',
28 silly get etag: '"1436454811000"',
28 silly get 'x-readtime': '18' } ]
29 verbose etag https://registry.npm.taobao.org/nodejieba from cache
30 verbose get saving nodejieba to C:\Users\honghe\.cnpm\registry.npm.taobao.org\nodejieba\.cache.json
31 silly addNameRange number 2 { name: 'nodejieba', range: '*', hasData: true }
32 silly addNameRange versions [ 'nodejieba',
32 silly addNameRange [ '1.2.1',
32 silly addNameRange '1.2.0',
32 silly addNameRange '1.1.0',
32 silly addNameRange '1.0.3',
32 silly addNameRange '1.0.2',
32 silly addNameRange '1.0.1',
32 silly addNameRange '1.0.0',
32 silly addNameRange '0.2.13',
32 silly addNameRange '0.2.12',
32 silly addNameRange '0.2.11',
32 silly addNameRange '0.2.10',
32 silly addNameRange '0.2.9',
32 silly addNameRange '0.2.7',
32 silly addNameRange '0.2.5',
32 silly addNameRange '0.2.4',
32 silly addNameRange '0.2.3',
32 silly addNameRange '0.2.2',
32 silly addNameRange '0.2.1',
32 silly addNameRange '0.2.0',
32 silly addNameRange '0.1.1',
32 silly addNameRange '0.1.4',
32 silly addNameRange '0.1.3',
32 silly addNameRange '0.1.2',
32 silly addNameRange '0.1.0' ] ]
33 silly addNamed [email protected]
34 verbose addNamed "1.2.1" is a plain semver version for nodejieba
35 silly mapToRegistry name nodejieba
36 silly mapToRegistry using default registry
37 silly mapToRegistry registry https://registry.npm.taobao.org/
38 silly mapToRegistry uri https://registry.npm.taobao.org/nodejieba
39 verbose addRemoteTarball https://registry.npm.taobao.org/nodejieba/download/nodejieba-1.2.1.tgz not in flight; adding
40 verbose addRemoteTarball [ 'https://registry.npm.taobao.org/nodejieba/download/nodejieba-1.2.1.tgz',
40 verbose addRemoteTarball 'aa30e01c6ca4447207995ebdc84f38445882b72d' ]
41 info retry fetch attempt 1 at 14:30:10
42 info attempt registry request try #1 at 14:30:10
43 http fetch GET https://registry.npm.taobao.org/nodejieba/download/nodejieba-1.2.1.tgz
44 http fetch 200 https://registry.npm.taobao.org/nodejieba/download/nodejieba-1.2.1.tgz
45 silly fetchAndShaCheck shasum aa30e01c6ca4447207995ebdc84f38445882b72d
46 verbose addTmpTarball C:\Users\honghe\AppData\Local\Temp\npm-4904-6ea1f536\registry.npm.taobao.org\nodejieba\download\nodejieba-1.2.1.tgz not in flight; adding
47 verbose addTmpTarball already have metadata; skipping unpack for [email protected]
48 silly cache afterAdd [email protected]
49 verbose afterAdd C:\Users\honghe\.cnpm\nodejieba\1.2.1\package\package.json not in flight; writing
50 verbose afterAdd C:\Users\honghe\.cnpm\nodejieba\1.2.1\package\package.json written
51 silly install resolved [ { name: 'nodejieba',
51 silly install resolved description: 'chinese word segmentation for node',
51 silly install resolved version: '1.2.1',
51 silly install resolved author: { name: 'Yanyi Wu', email: '[email protected]' },
51 silly install resolved maintainers: [ [Object] ],
51 silly install resolved main: './index.js',
51 silly install resolved engines: { node: '>= 0.10.0', iojs: '>= 1.0.0' },
51 silly install resolved repository:
51 silly install resolved { type: 'git',
51 silly install resolved url: 'git+ssh://[email protected]/yanyiwu/nodejieba.git' },
51 silly install resolved keywords: [ 'chinese', 'segment', 'cppjieba', 'jieba' ],
51 silly install resolved dependencies: { nan: '^1.8.0' },
51 silly install resolved devDependencies: { mocha: '~2.2.5', should: '~6.0.3' },
51 silly install resolved scripts:
51 silly install resolved { test: 'node test/demo.js && node test/load_dict_demo.js && mocha -R spec test/test.js && mocha -R spec test/load_dict_test.js',
51 silly install resolved install: 'node-gyp rebuild' },
51 silly install resolved license: 'MIT',
51 silly install resolved gypfile: true,
51 silly install resolved gitHead: '11fff83914d66c45f14b81bea84398ba2a32f3ce',
51 silly install resolved bugs: { url: 'https://github.com/yanyiwu/nodejieba/issues' },
51 silly install resolved homepage: 'https://github.com/yanyiwu/nodejieba#readme',
51 silly install resolved _id: '[email protected]',
51 silly install resolved _shasum: 'aa30e01c6ca4447207995ebdc84f38445882b72d',
51 silly install resolved _from: 'nodejieba@*',
51 silly install resolved _npmVersion: '2.10.1',
51 silly install resolved _nodeVersion: '0.12.4',
51 silly install resolved _npmUser: { name: 'aszxqw', email: '[email protected]' },
51 silly install resolved dist:
51 silly install resolved { shasum: 'aa30e01c6ca4447207995ebdc84f38445882b72d',
51 silly install resolved size: 4290932,
51 silly install resolved noattachment: false,
51 silly install resolved tarball: 'http://registry.npm.taobao.org/nodejieba/download/nodejieba-1.2.1.tgz' },
51 silly install resolved directories: {},
51 silly install resolved publish_time: 1436448276234,
51 silly install resolved _cnpm_publish_time: 1436448276234,
51 silly install resolved _resolved: 'https://registry.npm.taobao.org/nodejieba/download/nodejieba-1.2.1.tgz' } ]
52 info install [email protected] into C:\Users\honghe
53 info installOne [email protected]
54 verbose installOne of nodejieba to C:\Users\honghe not in flight; installing
55 verbose lock using C:\Users\honghe\.cnpm\_locks\nodejieba-24b5b5a33407a9f4.lock for C:\Users\honghe\node_modules\nodejieba
56 silly install write writing nodejieba 1.2.1 to C:\Users\honghe\node_modules\nodejieba
57 verbose unbuild node_modules\nodejieba
58 silly gentlyRm C:\Users\honghe\node_modules\nodejieba is being purged from base C:\Users\honghe
59 verbose gentlyRm don't care about contents; nuking C:\Users\honghe\node_modules\nodejieba
60 verbose tar unpack C:\Users\honghe\.cnpm\nodejieba\1.2.1\package.tgz
61 verbose tar unpacking to C:\Users\honghe\node_modules\nodejieba
62 silly gentlyRm C:\Users\honghe\node_modules\nodejieba is being purged
63 verbose gentlyRm don't care about contents; nuking C:\Users\honghe\node_modules\nodejieba
64 silly gunzTarPerm modes [ '777', '666' ]
65 silly gunzTarPerm extractEntry package.json
66 silly gunzTarPerm modified mode [ 'package.json', 436, 438 ]
67 silly gunzTarPerm extractEntry .npmignore
68 silly gunzTarPerm modified mode [ '.npmignore', 436, 438 ]
69 silly gunzTarPerm extractEntry README.md
70 silly gunzTarPerm modified mode [ 'README.md', 436, 438 ]
71 silly gunzTarPerm extractEntry index.js
72 silly gunzTarPerm modified mode [ 'index.js', 436, 438 ]
73 silly gunzTarPerm extractEntry .travis.yml
74 silly gunzTarPerm modified mode [ '.travis.yml', 436, 438 ]
75 silly gunzTarPerm extractEntry ChangeLog.md
76 silly gunzTarPerm modified mode [ 'ChangeLog.md', 436, 438 ]
77 silly gunzTarPerm extractEntry binding.gyp
78 silly gunzTarPerm modified mode [ 'binding.gyp', 436, 438 ]
79 silly gunzTarPerm extractEntry dict/hmm_model.utf8
80 silly gunzTarPerm modified mode [ 'dict/hmm_model.utf8', 436, 438 ]
81 silly gunzTarPerm extractEntry dict/idf.utf8
82 silly gunzTarPerm modified mode [ 'dict/idf.utf8', 436, 438 ]
83 silly gunzTarPerm extractEntry dict/jieba.dict.utf8
84 silly gunzTarPerm modified mode [ 'dict/jieba.dict.utf8', 436, 438 ]
85 silly gunzTarPerm extractEntry dict/stop_words.utf8
86 silly gunzTarPerm modified mode [ 'dict/stop_words.utf8', 436, 438 ]
87 silly gunzTarPerm extractEntry dict/user.dict.utf8
88 silly gunzTarPerm modified mode [ 'dict/user.dict.utf8', 436, 438 ]
89 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/LocalVector.hpp
90 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/LocalVector.hpp', 436, 438 ]
91 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/ArgvContext.hpp
92 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/ArgvContext.hpp', 436, 438 ]
93 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/BoundedQueue.hpp
94 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/BoundedQueue.hpp', 436, 438 ]
95 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/CastFloat.hpp
96 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/CastFloat.hpp', 436, 438 ]
97 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/Colors.hpp
98 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/Colors.hpp', 436, 438 ]
99 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/Condition.hpp
100 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/Condition.hpp', 436, 438 ]
101 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/Config.hpp
102 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/Config.hpp', 436, 438 ]
103 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/HandyMacro.hpp
104 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/HandyMacro.hpp', 436, 438 ]
105 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/InitOnOff.hpp
106 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/InitOnOff.hpp', 436, 438 ]
107 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/BlockingQueue.hpp
108 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/BlockingQueue.hpp', 436, 438 ]
109 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/Logger.hpp
110 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/Logger.hpp', 436, 438 ]
111 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/Md5.hpp
112 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/Md5.hpp', 436, 438 ]
113 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/MutexLock.hpp
114 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/MutexLock.hpp', 436, 438 ]
115 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/MysqlClient.hpp
116 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/MysqlClient.hpp', 436, 438 ]
117 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/NonCopyable.hpp
118 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/NonCopyable.hpp', 436, 438 ]
119 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/StdExtension.hpp
120 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/StdExtension.hpp', 436, 438 ]
121 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/StringUtil.hpp
122 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/StringUtil.hpp', 436, 438 ]
123 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/Thread.hpp
124 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/Thread.hpp', 436, 438 ]
125 silly gunzTarPerm extractEntry lib/CppJieba/Limonp/ThreadPool.hpp
126 silly gunzTarPerm modified mode [ 'lib/CppJieba/Limonp/ThreadPool.hpp', 436, 438 ]
127 silly gunzTarPerm extractEntry lib/CppJieba/Application.hpp
128 silly gunzTarPerm modified mode [ 'lib/CppJieba/Application.hpp', 436, 438 ]
129 silly gunzTarPerm extractEntry lib/CppJieba/FullSegment.hpp
130 silly gunzTarPerm modified mode [ 'lib/CppJieba/FullSegment.hpp', 436, 438 ]
131 silly gunzTarPerm extractEntry lib/CppJieba/HMMModel.hpp
132 silly gunzTarPerm modified mode [ 'lib/CppJieba/HMMModel.hpp', 436, 438 ]
133 silly gunzTarPerm extractEntry lib/CppJieba/HMMSegment.hpp
134 silly gunzTarPerm modified mode [ 'lib/CppJieba/HMMSegment.hpp', 436, 438 ]
135 silly gunzTarPerm extractEntry lib/CppJieba/ISegment.hpp
136 silly gunzTarPerm modified mode [ 'lib/CppJieba/ISegment.hpp', 436, 438 ]
137 silly gunzTarPerm extractEntry lib/CppJieba/KeywordExtractor.hpp
138 silly gunzTarPerm modified mode [ 'lib/CppJieba/KeywordExtractor.hpp', 436, 438 ]
139 silly gunzTarPerm extractEntry lib/CppJieba/DictTrie.hpp
140 silly gunzTarPerm modified mode [ 'lib/CppJieba/DictTrie.hpp', 436, 438 ]
141 silly gunzTarPerm extractEntry lib/CppJieba/MPSegment.hpp
142 silly gunzTarPerm modified mode [ 'lib/CppJieba/MPSegment.hpp', 436, 438 ]
143 silly gunzTarPerm extractEntry lib/CppJieba/MixSegment.hpp
144 silly gunzTarPerm modified mode [ 'lib/CppJieba/MixSegment.hpp', 436, 438 ]
145 silly gunzTarPerm extractEntry lib/CppJieba/PosTagger.hpp
146 silly gunzTarPerm modified mode [ 'lib/CppJieba/PosTagger.hpp', 436, 438 ]
147 silly gunzTarPerm extractEntry lib/CppJieba/QuerySegment.hpp
148 silly gunzTarPerm modified mode [ 'lib/CppJieba/QuerySegment.hpp', 436, 438 ]
149 silly gunzTarPerm extractEntry lib/CppJieba/SegmentBase.hpp
150 silly gunzTarPerm modified mode [ 'lib/CppJieba/SegmentBase.hpp', 436, 438 ]
151 silly gunzTarPerm extractEntry lib/CppJieba/TransCode.hpp
152 silly gunzTarPerm modified mode [ 'lib/CppJieba/TransCode.hpp', 436, 438 ]
153 silly gunzTarPerm extractEntry lib/CppJieba/Trie.hpp
154 silly gunzTarPerm modified mode [ 'lib/CppJieba/Trie.hpp', 436, 438 ]
155 silly gunzTarPerm extractEntry lib/index.cpp
156 silly gunzTarPerm modified mode [ 'lib/index.cpp', 436, 438 ]
157 silly gunzTarPerm extractEntry lib/nodejieba.cpp
158 silly gunzTarPerm modified mode [ 'lib/nodejieba.cpp', 436, 438 ]
159 silly gunzTarPerm extractEntry lib/nodejieba.h
160 silly gunzTarPerm modified mode [ 'lib/nodejieba.h', 436, 438 ]
161 silly gunzTarPerm extractEntry lib/utils.h
162 silly gunzTarPerm modified mode [ 'lib/utils.h', 436, 438 ]
163 silly gunzTarPerm extractEntry test/demo.js
164 silly gunzTarPerm modified mode [ 'test/demo.js', 436, 438 ]
165 silly gunzTarPerm extractEntry test/load_dict_demo.js
166 silly gunzTarPerm modified mode [ 'test/load_dict_demo.js', 436, 438 ]
167 silly gunzTarPerm extractEntry test/load_dict_test.js
168 silly gunzTarPerm modified mode [ 'test/load_dict_test.js', 436, 438 ]
169 silly gunzTarPerm extractEntry test/test.js
170 silly gunzTarPerm modified mode [ 'test/test.js', 436, 438 ]
171 silly gunzTarPerm extractEntry test/testdata/userdict.utf8
172 silly gunzTarPerm modified mode [ 'test/testdata/userdict.utf8', 436, 438 ]
173 verbose write writing to C:\Users\honghe\node_modules\nodejieba\package.json
174 info preinstall [email protected]
175 verbose readDependencies loading dependencies from C:\Users\honghe\node_modules\nodejieba\package.json
176 silly prepareForInstallMany adding nan@^1.8.0 from nodejieba dependencies
177 verbose readDependencies loading dependencies from C:\Users\honghe\node_modules\nodejieba\package.json
178 silly cache add args [ 'nan@^1.8.0', null ]
179 verbose cache add spec nan@^1.8.0
180 silly cache add parsed spec { raw: 'nan@^1.8.0',
180 silly cache add scope: null,
180 silly cache add name: 'nan',
180 silly cache add rawSpec: '^1.8.0',
180 silly cache add spec: '>=1.8.0 <2.0.0',
180 silly cache add type: 'range' }
181 silly addNamed nan@>=1.8.0 <2.0.0
182 verbose addNamed ">=1.8.0 <2.0.0" is a valid semver range for nan
183 silly addNameRange { name: 'nan', range: '>=1.8.0 <2.0.0', hasData: false }
184 silly mapToRegistry name nan
185 silly mapToRegistry using default registry
186 silly mapToRegistry registry https://registry.npm.taobao.org/
187 silly mapToRegistry uri https://registry.npm.taobao.org/nan
188 verbose addNameRange registry:https://registry.npm.taobao.org/nan not in flight; fetching
189 verbose request uri https://registry.npm.taobao.org/nan
190 verbose request no auth needed
191 info attempt registry request try #1 at 14:30:22
192 verbose etag "1430060305000"
193 http request GET https://registry.npm.taobao.org/nan
194 http 304 https://registry.npm.taobao.org/nan
195 silly get cb [ 304,
195 silly get { server: 'nginx/1.1.19',
195 silly get date: 'Mon, 27 Jul 2015 06:30:28 GMT',
195 silly get connection: 'keep-alive',
195 silly get etag: '"1430060305000"',
195 silly get 'x-readtime': '4188' } ]
196 verbose etag https://registry.npm.taobao.org/nan from cache
197 verbose get saving nan to C:\Users\honghe\.cnpm\registry.npm.taobao.org\nan\.cache.json
198 silly addNameRange number 2 { name: 'nan', range: '>=1.8.0 <2.0.0', hasData: true }
199 silly addNameRange versions [ 'nan',
199 silly addNameRange [ '1.8.4',
199 silly addNameRange '1.8.3',
199 silly addNameRange '1.8.2',
199 silly addNameRange '1.8.1',
199 silly addNameRange '1.8.0',
199 silly addNameRange '1.7.0',
199 silly addNameRange '1.6.2',
199 silly addNameRange '1.6.1',
199 silly addNameRange '1.5.3',
199 silly addNameRange '1.6.0',
199 silly addNameRange '1.5.2',
199 silly addNameRange '1.5.1',
199 silly addNameRange '1.4.3',
199 silly addNameRange '1.4.2',
199 silly addNameRange '1.5.0',
199 silly addNameRange '1.4.1',
199 silly addNameRange '1.4.0',
199 silly addNameRange '1.3.0',
199 silly addNameRange '1.2.0',
199 silly addNameRange '1.1.2',
199 silly addNameRange '1.1.1',
199 silly addNameRange '1.1.0',
199 silly addNameRange '1.0.0',
199 silly addNameRange '0.8.0',
199 silly addNameRange '0.7.1',
199 silly addNameRange '0.7.0',
199 silly addNameRange '0.6.0',
199 silly addNameRange '0.5.2',
199 silly addNameRange '0.5.1',
199 silly addNameRange '0.5.0',
199 silly addNameRange '0.4.4',
199 silly addNameRange '0.4.3',
199 silly addNameRange '0.4.2',
199 silly addNameRange '0.4.1',
199 silly addNameRange '0.4.0',
199 silly addNameRange '0.3.2',
199 silly addNameRange '0.3.1',
199 silly addNameRange '0.3.0',
199 silly addNameRange '0.3.0-wip2',
199 silly addNameRange '0.3.0-wip' ] ]
200 silly addNamed [email protected]
201 verbose addNamed "1.8.4" is a plain semver version for nan
202 silly cache afterAdd [email protected]
203 verbose afterAdd C:\Users\honghe\.cnpm\nan\1.8.4\package\package.json not in flight; writing
204 verbose afterAdd C:\Users\honghe\.cnpm\nan\1.8.4\package\package.json written
205 silly install resolved [ { name: 'nan',
205 silly install resolved version: '1.8.4',
205 silly install resolved description: 'Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility',
205 silly install resolved main: 'include_dirs.js',
205 silly install resolved repository: { type: 'git', url: 'git://github.com/iojs/nan.git' },
205 silly install resolved scripts:
205 silly install resolved { test: 'tap --gc test/js/*-test.js',
205 silly install resolved 'rebuild-tests': 'pangyp rebuild --directory test' },
205 silly install resolved contributors:
205 silly install resolved [ [Object],
205 silly install resolved [Object],
205 silly install resolved [Object],
205 silly install resolved [Object],
205 silly install resolved [Object],
205 silly install resolved [Object],
205 silly install resolved [Object] ],
205 silly install resolved devDependencies:
205 silly install resolved { bindings: '~1.2.1',
205 silly install resolved 'node-gyp': '~1.0.2',
205 silly install resolved pangyp: '~2.0.1',
205 silly install resolved tap: '~0.7.1',
205 silly install resolved xtend: '~4.0.0' },
205 silly install resolved license: 'MIT',
205 silly install resolved gitHead: 'ed3bbf4ced0cf7937b4e4164766797f71aa97f3d',
205 silly install resolved bugs: { url: 'https://github.com/iojs/nan/issues' },
205 silly install resolved homepage: 'https://github.com/iojs/nan#readme',
205 silly install resolved _id: '[email protected]',
205 silly install resolved _shasum: '3c76b5382eab33e44b758d2813ca9d92e9342f34',
205 silly install resolved _from: 'nan@>=1.8.0 <2.0.0',
205 silly install resolved _npmVersion: '2.8.3',
205 silly install resolved _nodeVersion: '0.12.2',
205 silly install resolved _npmUser: { name: 'kkoopa', email: '[email protected]' },
205 silly install resolved maintainers: [ [Object], [Object] ],
205 silly install resolved dist:
205 silly install resolved { shasum: '3c76b5382eab33e44b758d2813ca9d92e9342f34',
205 silly install resolved size: 37152,
205 silly install resolved noattachment: false,
205 silly install resolved tarball: 'http://registry.npm.taobao.org/nan/download/nan-1.8.4.tgz' },
205 silly install resolved directories: {},
205 silly install resolved publish_time: 1430058759821,
205 silly install resolved _cnpm_publish_time: 1430058759821,
205 silly install resolved _resolved: 'https://registry.npm.taobao.org/nan/download/nan-1.8.4.tgz',
205 silly install resolved readme: 'ERROR: No README data found!' } ]
206 info install [email protected] into C:\Users\honghe\node_modules\nodejieba
207 info installOne [email protected]
208 verbose installOne of nan to C:\Users\honghe\node_modules\nodejieba not in flight; installing
209 verbose lock using C:\Users\honghe\.cnpm\_locks\nan-e75ba431bf067fc5.lock for C:\Users\honghe\node_modules\nodejieba\node_modules\nan
210 silly install write writing nan 1.8.4 to C:\Users\honghe\node_modules\nodejieba\node_modules\nan
211 verbose unbuild node_modules\nodejieba\node_modules\nan
212 silly gentlyRm C:\Users\honghe\node_modules\nodejieba\node_modules\nan is being purged from base C:\Users\honghe
213 verbose gentlyRm don't care about contents; nuking C:\Users\honghe\node_modules\nodejieba\node_modules\nan
214 verbose tar unpack C:\Users\honghe\.cnpm\nan\1.8.4\package.tgz
215 verbose tar unpacking to C:\Users\honghe\node_modules\nodejieba\node_modules\nan
216 silly gentlyRm C:\Users\honghe\node_modules\nodejieba\node_modules\nan is being purged
217 verbose gentlyRm don't care about contents; nuking C:\Users\honghe\node_modules\nodejieba\node_modules\nan
218 silly gunzTarPerm modes [ '777', '666' ]
219 silly gunzTarPerm extractEntry package.json
220 silly gunzTarPerm modified mode [ 'package.json', 436, 438 ]
221 silly gunzTarPerm extractEntry README.md
222 silly gunzTarPerm modified mode [ 'README.md', 436, 438 ]
223 silly gunzTarPerm extractEntry include_dirs.js
224 silly gunzTarPerm modified mode [ 'include_dirs.js', 436, 438 ]
225 silly gunzTarPerm extractEntry LICENSE.md
226 silly gunzTarPerm modified mode [ 'LICENSE.md', 436, 438 ]
227 silly gunzTarPerm extractEntry .dntrc
228 silly gunzTarPerm modified mode [ '.dntrc', 436, 438 ]
229 silly gunzTarPerm extractEntry appveyor.yml
230 silly gunzTarPerm modified mode [ 'appveyor.yml', 436, 438 ]
231 silly gunzTarPerm extractEntry nan.h
232 silly gunzTarPerm modified mode [ 'nan.h', 436, 438 ]
233 silly gunzTarPerm extractEntry nan_implementation_12_inl.h
234 silly gunzTarPerm modified mode [ 'nan_implementation_12_inl.h', 436, 438 ]
235 silly gunzTarPerm extractEntry nan_implementation_pre_12_inl.h
236 silly gunzTarPerm modified mode [ 'nan_implementation_pre_12_inl.h', 436, 438 ]
237 silly gunzTarPerm extractEntry nan_new.h
238 silly gunzTarPerm modified mode [ 'nan_new.h', 436, 438 ]
239 silly gunzTarPerm extractEntry nan_string_bytes.h
240 silly gunzTarPerm modified mode [ 'nan_string_bytes.h', 436, 438 ]
241 silly gunzTarPerm extractEntry CHANGELOG.md
242 silly gunzTarPerm modified mode [ 'CHANGELOG.md', 436, 438 ]
243 verbose write writing to C:\Users\honghe\node_modules\nodejieba\node_modules\nan\package.json
244 info preinstall [email protected]
245 verbose readDependencies loading dependencies from C:\Users\honghe\node_modules\nodejieba\node_modules\nan\package.json
246 verbose readDependencies loading dependencies from C:\Users\honghe\node_modules\nodejieba\node_modules\nan\package.json
247 silly install resolved []
248 verbose about to build C:\Users\honghe\node_modules\nodejieba\node_modules\nan
249 info build C:\Users\honghe\node_modules\nodejieba\node_modules\nan
250 info linkStuff [email protected]
251 silly linkStuff [email protected] has C:\Users\honghe\node_modules\nodejieba\node_modules as its parent node_modules
252 verbose linkBins [email protected]
253 verbose linkMans [email protected]
254 verbose rebuildBundles [email protected]
255 info install [email protected]
256 info postinstall [email protected]
257 verbose unlock done using C:\Users\honghe\.cnpm\_locks\nan-e75ba431bf067fc5.lock for C:\Users\honghe\node_modules\nodejieba\node_modules\nan
258 verbose about to build C:\Users\honghe\node_modules\nodejieba
259 info build C:\Users\honghe\node_modules\nodejieba
260 info linkStuff [email protected]
261 silly linkStuff [email protected] has C:\Users\honghe\node_modules as its parent node_modules
262 verbose linkBins [email protected]
263 verbose linkMans [email protected]
264 verbose rebuildBundles [email protected]
265 verbose rebuildBundles [ 'nan' ]
266 info install [email protected]
267 verbose unsafe-perm in lifecycle true
268 info [email protected] Failed to exec install script
269 verbose unlock done using C:\Users\honghe\.cnpm\_locks\nodejieba-24b5b5a33407a9f4.lock for C:\Users\honghe\node_modules\nodejieba
270 verbose stack Error: [email protected] install: `node-gyp rebuild`
270 verbose stack Exit status 1
270 verbose stack at EventEmitter.<anonymous> (C:\Users\honghe\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\lib\utils\lifecycle.js:214:16)
270 verbose stack at EventEmitter.emit (events.js:110:17)
270 verbose stack at ChildProcess.<anonymous> (C:\Users\honghe\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\lib\utils\spawn.js:24:14)
270 verbose stack at ChildProcess.emit (events.js:110:17)
270 verbose stack at maybeClose (child_process.js:1015:16)
270 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
271 verbose pkgid [email protected]
272 verbose cwd C:\Users\honghe
273 error Windows_NT 6.3.9600
274 error argv "node" "C:\\Users\\honghe\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npm\\bin\\npm-cli.js" "--userconfig=C:\\Users\\honghe\\.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--cache=C:\\Users\\honghe\\.cnpm" "--registry=https://registry.npm.taobao.org" "--node-gyp=C:\\Users\\honghe\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\pangyp\\bin\\node-gyp.js" "install" "nodejieba"
275 error node v0.12.5
276 error npm v2.13.2
277 error code ELIFECYCLE
278 error [email protected] install: `node-gyp rebuild`
278 error Exit status 1
279 error Failed at the [email protected] install script 'node-gyp rebuild'.
279 error This is most likely a problem with the nodejieba package,
279 error not with npm itself.
279 error Tell the author that this fails on your system:
279 error node-gyp rebuild
279 error You can get their info via:
279 error npm owner ls nodejieba
279 error There is likely additional logging output above.
280 verbose exit [ 1, true ]
281 verbose unbuild node_modules\nodejieba
282 info preuninstall [email protected]
283 info uninstall [email protected]
284 verbose unbuild rmStuff [email protected] from C:\Users\honghe\node_modules
285 info postuninstall [email protected]
286 silly gentlyRm C:\Users\honghe\node_modules\nodejieba is being purged from base C:\Users\honghe
287 verbose gentlyRm don't care about contents; nuking C:\Users\honghe\node_modules\nodejieba
288 silly vacuum-fs purging C:\Users\honghe\node_modules\nodejieba
289 silly vacuum-fs quitting because other entries in C:\Users\honghe\node_modules
代码:
var nodejieba = require("nodejieba");
nodejieba.loadDict("./node_modules/nodejieba/dict/jieba.dict.utf8", "./node_modules/nodejieba/dict/hmm_model.utf8", "./node_modules/nodejieba/dict/user.dict.utf8");
nodejieba.cut("非阻塞模式分词", function(wordList) {
wordList.forEach(function(word) {
console.log(word);
});
});
错误:
/usr/local/bin/node jieba.js
Assertion failed: (ifs.is_open()), function _loadDict, file ../src/CppJieba/DictTrie.hpp, line 146.
Process finished with exit code 134
.node-gyp/4.0.0/src/node.h:42:10: fatal error: 'v8.h' file not found
一直报gyp相关的错
\nodejieba\src\cppjieba\Limonp/logger.hpp(42): error C3861: “time”: 找不到标识符
而我自己代码中传递callback结果wordlist还是同步返回了,所以想问一下,多谢
拷贝自 issue45 作者反馈的第二个问题。
再汇报个问题,就是在Windows 8下1.4.3虽然安装上了,但还是不能用,并且会让gitbook的脚本挂掉且没有错误信息。我稍微定位了一下,是index.js中的wrapWithDictLoad()函数这里执行中断的:
var someFunct = obj[functName];
这里得到的someFunct为undefined,这说明native部分即使编译成功,也还是有问题。
然后我在一台Linux机器上试了一下,1.4.5可以正常安装和使用,没问题。
建议在README.md中说明Windows下可能还有问题,优先建议在Linux下使用,这样可以节省使用者的时间哈
在本地跑是没有问题的,具体的路径可以查看 这里 ,nodejieba引用在app/models/nodejieba.js,在app/controllers/ad里调用了nodejieba。
但是部署到百度BAE上后,出现了路径问题,提示如下:
node: ../src/CppJieba/DictTrie.hpp:146: void CppJieba::DictTrie::_loadDict(const string&): Assertion `ifs.is_open()' failed.
module.js:355
Module._extensions[extension](this, filename);
^
Error: Module did not self-register.
at Error (native)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/Seven/works/qlist/base/node_modules/nodejieba/index.js:1:77)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
更新到新版本v0.2.1后调用queryCut出现以下问题:
node: ../src/CppJieba/SegmentBase.hpp:24: virtual bool CppJieba::SegmentBase::cut(const std::string&, std::vector<std::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::basic_string<char, std::char_traits, std::allocator > > >&) const: Assertion `_getInitFlag()' failed.
环境 CentOS release 6.4 (Final) 32位
[ '我:r',
'是:v',
'拖拉机:n',
'学院:n',
'手扶拖拉机:n',
'专业:n',
'的:uj',
'。:x',
'不用:v',
'多久:m',
',:x',
'我:r',
'就:d',
'会:v',
'升职:v',
'加薪:nr',
',:x',
'当上:t',
'CEO:eng',
',:x',
'走上:v',
'人生:n',
'巅峰:n',
'。:x' ]
[ 'CEO:11.7392',
'升职:10.8562',
'加薪:10.6426',
'手扶拖拉机:10.0089',
'巅峰:9.49396' ]
结果是数组,那么每一条拿出来之后还要 split,或者正则匹配出对应的数据,这样很麻烦。
为什么不直接放对象?
{
'CEO': 11.7392,
'升职': 10.8562
}
像这样。
还是说有什么更好的实践?
v0.2.8在 npm publish
的时候有误操作,
导致在 npm install nodejieba
的时候会报错。
已被弃用。
请使用 v0.2.9。
多次load userdict时,内存涨的很快。
我不太清楚 load 是增量增加字典还是会重新载入一遍userDict?
/usr/local/bin/node test.js
2015-03-26 21:09:50 MPSegment.hpp:31 INFO MPSegment init(./node_modules/nodejieba/dict/jieba.dict.utf8) ok
2015-03-26 21:09:50 HMMSegment.hpp:268 DEBUG loadModel [./node_modules/nodejieba/dict/hmm_model.utf8] start ...
2015-03-26 21:09:51 HMMSegment.hpp:332 DEBUG loadModel [./node_modules/nodejieba/dict/hmm_model.utf8] end.
2015-03-26 21:09:51 HMMSegment.hpp:58 INFO HMMSegment init(./node_modules/nodejieba/dict/hmm_model.utf8) ok.
2015-03-26 21:09:51 MixSegment.hpp:28 INFO MixSegment init(./node_modules/nodejieba/dict/jieba.dict.utf8, ./node_modules/nodejieba/dict/hmm_model.utf8)
Assertion failed: (maxWordLen), function init, file ../src/CppJieba/QuerySegment.hpp, line 37.
var nodejieba = require("nodejieba");
nodejieba.queryLoadDict(
"./node_modules/nodejieba/dict/jieba.dict.utf8",
"./node_modules/nodejieba/dict/hmm_model.utf8",
"./node_modules/nodejieba/dict/user.dict.utf8");
var tl = nodejieba.extractSync("阻塞的南京市长江大桥", 5);
for(var i = 0; i < tl.length; i++) {
console.log(i + " == " + tl[i]);
}
1.4.5的编译错误为:
···
[email protected] install E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba
node-gyp rebuild
E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba>if not defined npm_config_node_gyp (node "C
:\Users\kheji_000\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\b
in\node-gyp.js" rebuild ) else (node C:\Users\kheji_000\AppData\Roaming\npm\node_modules\cnpm\node_modules\node-gyp\bin
\node-gyp.js rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
index.cpp
nodejieba.cpp
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\utils.h(19): warning C4267: “参数”: 从“
si
ze_t”转换到“uint32_t”,可能丢失数据 (..\lib\index.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modul
es\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\utils.h(19): warning C4267: “参数”: 从“
si
ze_t”转换到“uint32_t”,可能丢失数据 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_m
odules\no
dejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\utils.h(30): warning C4267: “参数”: 从“
si
ze_t”转换到“uint32_t”,可能丢失数据 (..\lib\index.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modul
es\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\utils.h(30): warning C4267: “参数”: 从“
si
ze_t”转换到“uint32_t”,可能丢失数据 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_m
odules\no
dejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\utils.h(41): warning C4267: “参数”: 从“
si
ze_t”转换到“uint32_t”,可能丢失数据 (..\lib\index.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modul
es\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\utils.h(41): warning C4267: “参数”: 从“
si
ze_t”转换到“uint32_t”,可能丢失数据 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_m
odules\no
dejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\limonp/Logging.hpp(25): error C2
059: 语法错误:“常量” (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieb
a\bui
ld\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\limonp/Logging.hpp(25): error C3
805: “常量”: 意外标记,应输入“}”或者“,” (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\n
ode_modules
\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\limonp/Logging.hpp(44): error C3
861: “time”: 找不到标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
dejie
ba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\limonp/Logging.hpp(45): error C3
861: “strftime”: 找不到标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_module
s\nod
ejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\limonp/Logging.hpp(45): error C3
861: “localtime”: 找不到标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modul
es\no
dejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\limonp/Logging.hpp(59): error C2
065: “FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules
nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\node_modules\nan\nan_new.h(208): warning C
4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 (..\lib\index.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-
pro\node_mod
ules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\utils.h(17): 参见对正在编译的
函数 模板 实
例化“v8::Localv8::Array Nan::New<v8::Array,unsigned __int64>(A0)”的引用
with
[
A0=unsigned _int64
]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(100): error C2039:
“FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\n
odej
ieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(100): error C2065:
“FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodej
ieba\b
uild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(100): error C2228:
“.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_mod
ules\nodej
ieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(129): error C2589:
“常量”:“::”右边的非法标记 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nod
ejieba\b
uild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(129): error C2143:
语法错误 : 缺少“)”(在“::”的前面) (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodej
ieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(129): error C2512:
“limonp::Logger::Logger”: 没有合适的默认构造函数可用 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-
search-pro\n
ode_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(129): error C2059:
语法错误:“)” (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\build
nod
ejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(139): error C2039:
“FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\n
odej
ieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(139): error C2065:
“FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodej
ieba\b
uild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(139): error C2228:
“.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_mod
ules\nodej
ieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(146): error C2039:
“FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\n
odej
ieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(146): error C2065:
“FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodej
ieba\b
uild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(146): error C2228:
“.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_mod
ules\nodej
ieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(160): error C2039:
“FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\n
odej
ieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(160): error C2065:
“FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodej
ieba\b
uild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\DictTrie.hpp(160): error C2228:
“.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_mod
ules\nodej
ieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\SegmentBase.hpp : warning C4819:
该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (..\lib\nodejieba.cpp) [E:\xcl
oud2-doc\node_modules\gitbook-plugin
-search-pro\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\FullSegment.hpp(65): warning C42
67: “=”: 从“size_t”转换到“int”,可能丢失数据 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-p
ro\node_mo
dules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(35): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(35): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(35): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(40): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(40): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(40): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(42): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(42): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(42): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(49): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(49): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(49): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(51): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(51): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(51): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(58): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(58): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(58): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(59): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(59): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(59): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(62): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(62): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(62): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(63): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(63): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(63): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(66): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(66): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(66): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(67): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(67): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(67): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(70): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(70): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(70): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(71): error C2039: “
FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\no
deji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(71): error C2065: “
FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodeji
eba\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(71): error C2228: “
.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodeji
eba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(104): error C2589:
“常量”:“::”右边的非法标记 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nod
ejieba\b
uild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(104): error C2143:
语法错误 : 缺少“)”(在“::”的前面) (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodej
ieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(104): error C2512:
“limonp::Logger::Logger”: 没有合适的默认构造函数可用 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-
search-pro\n
ode_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(104): error C2059:
语法错误:“)” (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\build
nod
ejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(108): error C2589:
“常量”:“::”右边的非法标记 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nod
ejieba\b
uild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(108): error C2143:
语法错误 : 缺少“)”(在“::”的前面) (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodej
ieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(108): error C2512:
“limonp::Logger::Logger”: 没有合适的默认构造函数可用 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-
search-pro\n
ode_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMModel.hpp(108): error C2059:
语法错误:“)” (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\build
nod
ejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMSegment.hpp(152): warning C42
67: “=”: 从“size_t”转换到“int”,可能丢失数据 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-p
ro\node_mo
dules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\HMMSegment.hpp(168): warning C42
67: “初始化”: 从“size_t”转换到“int”,可能丢失数据 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-sea
rch-pro\node
modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\PosTagger.hpp(38): error C2589:
“常量”:“::”右边的非法标记 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nod
ejieba\b
uild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\PosTagger.hpp(38): error C2143:
语法错误 : 缺少“)”(在“::”的前面) (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\nodej
ieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\PosTagger.hpp(38): error C2512:
“limonp::Logger::Logger”: 没有合适的默认构造函数可用 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-
search-pro\n
ode_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba\PosTagger.hpp(38): error C2059:
语法错误:“)” (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\build
nod
ejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(82): error
C2039: “FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_mo
dule
s\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(82): error
C2065: “FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_module
s\node
jieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(82): error
C2228: “.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\n
ode_module
s\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(91): error
C2589: “常量”:“::”右边的非法标记 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\node
jieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(91): error
C2143: 语法错误 : 缺少“)”(在“::”的前面) (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\no
de_module
s\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(91): error
C2512: “limonp::Logger::Logger”: 没有合适的默认构造函数可用 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-
plugin-searc
h-pro\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(91): error
C2059: 语法错误:“)” (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba
\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(96): error
C2589: “常量”:“::”右边的非法标记 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modu
les\node
jieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(96): error
C2143: 语法错误 : 缺少“)”(在“::”的前面) (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\no
de_module
s\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(96): error
C2512: “limonp::Logger::Logger”: 没有合适的默认构造函数可用 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-
plugin-searc
h-pro\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(96): error
C2059: 语法错误:“)” (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba
\bu
ild\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(111): error
C2039: “FATAL”: 不是“limonp”的成员 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_m
odul
es\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(111): error
C2065: “FATAL”: 未声明的标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modul
es\nod
ejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\lib\jieba/KeywordExtractor.hpp(111): error
C2228: “.Stream”的左边必须有类/结构/联合 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro
node_modul
es\nodejieba\build\nodejieba.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\kheji_000\AppData\Roaming\npm\node_modules\cnpm\node_modules\node-gy
p\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:88:13)
gyp ERR! stack at ChildProcess.emit (events.js:173:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\kheji_000\AppData\Roaming\npm\node_modules\cnpm
\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba
gyp ERR! node -v v5.2.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\kheji_000\AppData\Roaming\npm\node_modules\cnpm\no
de_modules\npm\bin\npm-cli.js" "--userconfig=C:\Users\kheji_000.cnpmrc" "--disturl=https://npm.taobao.org/mirrors
/node" "--cache=C:\Users\kheji_000.cnpm" "--registry=https://registry.npm.taobao.org" "--node-gyp=C:\Users\kheji_0
00\AppData\Roaming\npm\node_modules\cnpm\node_modules\node-gyp\bin\node-gyp.js" "install" "[email protected]"
npm ERR! node v5.2.0
npm ERR! npm v2.14.15
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the nodejieba package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls nodejieba
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\npm-debug.log
···
I am getting this on both OS X and linux. I am actually trying to build keystonejs where this is a dependency.
dade@choo:~/work/keystone(master)$ npm install nodejieba
\
> [email protected] install /Users/dade/work/keystone/node_modules/nodejieba
> node-gyp rebuild
CXX(target) Release/obj.target/nodejieba/lib/index.o
In file included from ../lib/index.cpp:1:
In file included from ../lib/nodejieba.h:4:
../lib/utils.h:17:11: error: use of undeclared identifier 'NanIntern'
array = NanIntern::Factory<v8::Array>::New(ov.size());
^
../lib/utils.h:17:39: error: expected '(' for function-style cast or type construction
array = NanIntern::Factory<v8::Array>::New(ov.size());
~~~~~~~~~^
../lib/utils.h:17:42: error: no member named 'New' in the global namespace
array = NanIntern::Factory<v8::Array>::New(ov.size());
~~^
../lib/utils.h:19:21: error: use of undeclared identifier 'NanIntern'
array->Set(i, NanIntern::Factory<v8::String>::New(ov[i].c_str()));
^
../lib/utils.h:19:50: error: expected '(' for function-style cast or type construction
array->Set(i, NanIntern::Factory<v8::String>::New(ov[i].c_str()));
~~~~~~~~~~^
../lib/utils.h:19:53: error: no member named 'New' in the global namespace
array->Set(i, NanIntern::Factory<v8::String>::New(ov[i].c_str()));
~~^
../lib/utils.h:24:11: error: use of undeclared identifier 'NanIntern'
array = NanIntern::Factory<v8::Array>::New(ov.size());
^
../lib/utils.h:24:39: error: expected '(' for function-style cast or type construction
array = NanIntern::Factory<v8::Array>::New(ov.size());
~~~~~~~~~^
../lib/utils.h:24:42: error: no member named 'New' in the global namespace
array = NanIntern::Factory<v8::Array>::New(ov.size());
~~^
../lib/utils.h:30:19: error: use of undeclared identifier 'NanIntern'
array->Set(i, NanIntern::Factory<v8::String>::New(ss.str().c_str()));
^
../lib/utils.h:30:48: error: expected '(' for function-style cast or type construction
array->Set(i, NanIntern::Factory<v8::String>::New(ss.str().c_str()));
~~~~~~~~~~^
../lib/utils.h:30:51: error: no member named 'New' in the global namespace
array->Set(i, NanIntern::Factory<v8::String>::New(ss.str().c_str()));
~~^
../lib/utils.h:35:11: error: use of undeclared identifier 'NanIntern'
array = NanIntern::Factory<v8::Array>::New(ov.size());
^
../lib/utils.h:35:39: error: expected '(' for function-style cast or type construction
array = NanIntern::Factory<v8::Array>::New(ov.size());
~~~~~~~~~^
../lib/utils.h:35:42: error: no member named 'New' in the global namespace
array = NanIntern::Factory<v8::Array>::New(ov.size());
~~^
../lib/utils.h:41:19: error: use of undeclared identifier 'NanIntern'
array->Set(i, NanIntern::Factory<v8::String>::New(ss.str().c_str()));
^
../lib/utils.h:41:48: error: expected '(' for function-style cast or type construction
array->Set(i, NanIntern::Factory<v8::String>::New(ss.str().c_str()));
~~~~~~~~~~^
../lib/utils.h:41:51: error: no member named 'New' in the global namespace
array->Set(i, NanIntern::Factory<v8::String>::New(ss.str().c_str()));
~~^
18 errors generated.
make: *** [Release/obj.target/nodejieba/lib/index.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/dade/work/keystone/node_modules/nodejieba
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "nodejieba"
npm ERR! node v0.12.7
npm ERR! npm v2.12.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the nodejieba package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls nodejieba
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/dade/work/keystone/npm-debug.log
dade@choo:~/work/keystone(master)$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.