Comments (13)
谢谢,大概定位到原因了,应该是命名上的一些冲突,我晚上找时间修复一下。非常感谢你的反馈!
from nodejieba.
再汇报个问题,就是在Windows 8下1.4.3虽然安装上了,但还是不能用,并且会让gitbook的脚本挂掉且没有错误信息。我稍微定位了一下,是index.js中的wrapWithDictLoad()函数这里执行中断的:
var someFunct = obj[functName];
这里得到的someFunct为undefined,这说明native部分即使编译成功,也还是有问题。
然后我在一台Linux机器上试了一下,1.4.5可以正常安装和使用,没问题。
建议在README.md中说明Windows下可能还有问题,优先建议在Linux下使用,这样可以节省使用者的时间哈
from nodejieba.
@khejing 你好,很抱歉让你遇到这些问题。因为我不怎么在windows上面工作,所以确实可以对windows支持的不如linux好。
不过目前你反馈的第一个问题,我经常定位和修复,发布了新版本 [email protected] ,预期更新到这个版本应该就能修复该问题。希望你更新一下试试,再次感谢反馈!
至于你反馈的第二个问题『在Windows 8下1.4.3虽然安装上了,但还是不能用』我另开的一个新的issue, #46 ,如果你更新到 [email protected] 依然存在这个问题,希望把错误贴到 issue46 上面,我尽力修复。非常感谢!
from nodejieba.
至于你建议的更新README.md提醒用户,确实很有道理。但是因为之前也有用户在Windows上面使用没有问题,所以我侥幸得认为可能是最近几个版本更新导致的,所以如果你更新到 [email protected] 后仍然有问题的话,我会按照你说的更新README.md提醒用户一下。多谢!
from nodejieba.
感谢您的快速回复,其实该说感谢的是我,谢谢了!但遗憾的是1.4.6错误信息虽然比之前少了,但仍然没有编译过:
PS E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro> cnpm install nodejieba
\
[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\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(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(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(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(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\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\deps\limonp/Logging.hpp(44): error C3861:
“time”: 找不到标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejie
ba\bu
ild\nodejieba.vcxproj]
E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\deps\limonp/Logging.hpp(45): error C3861:
“strftime”: 找不到标识符 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nod
ejieb
a\build\nodejieba.vcxproj]
E:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\deps\limonp/Logging.hpp(45): error C3861:
“localtime”: 找不到标识符 (..\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\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\deps\cppjieba\SegmentBase.hpp : warning C4
819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (..\lib\nodejieba.cpp) [E:
\xcloud2-doc\node_modules\gitbook-pl
ugin-search-pro\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\deps\cppjieba\FullSegment.hpp(65): warning
C4267: “=”: 从“size_t”转换到“int”,可能丢失数据 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-sear
ch-pro\nod
e_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\deps\cppjieba\HMMSegment.hpp(152): warning
C4267: “=”: 从“size_t”转换到“int”,可能丢失数据 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin-sear
ch-pro\nod
e_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\gitbook-plugin-search-pro\node_modules\nodejieba\deps\cppjieba\HMMSegment.hpp(168): warning
C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\gitbook-plugin
-search-pro\n
ode_modules\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" "nodejieba"
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
from nodejieba.
好的,看来我得自己在Windows上面折腾试试了,我先把README.md上面标注一下对Windows支持有问题吧,然后我尽快修复掉吧。
from nodejieba.
@khejing 你好,能问一下你的Visual Studio 的版本是多少的吗?
from nodejieba.
我就是按照node-gyp代码库的首页README安装的,具体的我明天看下回复哈
from nodejieba.
@khejing 你好,我最近折腾了一下 Windows 上面的兼容性问题,上次你报的问题应该已经在 [email protected] 版本里面修复了,希望你能升级一下试试看。希望得到你的反馈,非常感谢。
from nodejieba.
@khejing 哥们,跪求更新反馈啊。。。
from nodejieba.
不好意思!这两天公司开年会没验证哈。我在家里的win7 32位电脑上刚试了下,能编译通过,谢谢了!
PS F:\code_downloaded\test> cnpm install nodejieba
|
> [email protected] install F:\code_downloaded\test\node_modules\nodejieba
> node-gyp rebuild
F:\code_downloaded\test\node_modules\nodejieba>if not defined npm_config_node_gyp (node "C:\Users\ibm\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\bin\node-gyp-bin\\..\..\node_mod
ules\node-gyp\bin\node-gyp.js" rebuild ) else (node C:\Users\ibm\AppData\Roaming\npm\node_modules\cnpm\node_modules\node-gyp\bin\node-gyp.js rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
index.cpp
nodejieba.cpp
f:\code_downloaded\test\node_modules\nodejieba\deps\cppjieba\SegmentBase.hpp : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (..\li
b\nodejieba.cpp) [F:\code_downloaded
\test\node_modules\nodejieba\build\nodejieba.vcxproj]
win_delay_load_hook.c
正在创建库 F:\code_downloaded\test\node_modules\nodejieba\build\Release\nodejieba.lib 和对象 F:\code_downloaded\test\node_modules\nodejieba\build\Release\nodejieba.exp
正在生成代码
已完成代码的生成
nodejieba.vcxproj -> F:\code_downloaded\test\node_modules\nodejieba\build\Release\\nodejieba.node
[email protected] node_modules\nodejieba
└── [email protected]
不过这个环境和发现问题的环境,即我在公司用的win8 64位电脑还是不大一样。等到下周一我到公司,还会用工作电脑再确认下,到时再反馈哈
from nodejieba.
@khejing 好的,那就周一再试试。多谢。
from nodejieba.
刚验证了,在win8 64位电脑上升级到1.4.7也可以编译通过了:
PS E:\xcloud2-doc> cnpm install nodejieba
|
[email protected] install E:\xcloud2-doc\node_modules\nodejieba
node-gyp rebuild
E:\xcloud2-doc\node_modules\nodejieba>if not defined npm_config_node_gyp (node "C:\Users\kheji_000\AppData\Roaming\npm\n
ode_modules\cnpm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\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\nodejieba\lib\utils.h(19): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (
..\lib\nodej
ieba.cpp) [E:\xcloud2-doc\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\nodejieba\lib\utils.h(19): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (
..\lib\index
.cpp) [E:\xcloud2-doc\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\nodejieba\lib\utils.h(30): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (
..\lib\index
.cpp) [E:\xcloud2-doc\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\nodejieba\lib\utils.h(30): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (
..\lib\nodej
ieba.cpp) [E:\xcloud2-doc\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\nodejieba\lib\utils.h(41): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (
..\lib\index
.cpp) [E:\xcloud2-doc\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\nodejieba\lib\utils.h(41): warning C4267: “参数”: 从“size_t”转换到“uint32_t”,可能丢失数据 (
..\lib\nodej
ieba.cpp) [E:\xcloud2-doc\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\nodejieba\node_modules\nan\nan_new.h(208): warning C4267: “参数”: 从“size_t”转换到“int”,可
能丢失数据 (.
.\lib\index.cpp) [E:\xcloud2-doc\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\nodejieba\lib\utils.h(17): 参见对正在编译的函数 模板 实例化“v8::Localv8::Array N
an::New<v8::Ar
ray,unsigned __int64>(A0)”的引用
with
[
A0=unsigned __int64
]
e:\xcloud2-doc\node_modules\nodejieba\deps\cppjieba\SegmentBase.hpp : warning C4819: 该文件包含不能在当前代码页(936)中表
示的字符。请将该文件保存为
Unicode 格式以防止数据丢失 (..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\nodejieba\deps\cppjieba\FullSegment.hpp(65): warning C4267: “=”: 从“size_t”转换到“int”,可能
丢失数据 (
..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\nodejieba\deps\cppjieba\HMMSegment.hpp(152): warning C4267: “=”: 从“size_t”转换到“int”,可能
丢失数据 (
..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\nodejieba\deps\cppjieba\HMMSegment.hpp(168): warning C4267: “初始化”: 从“size_t”转换到“int”
,可能丢失数据
(..\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\nodejieba\node_modules\nan\nan_new.h(208): warning C4267: “参数”: 从“size_t”转换到“int”,可
能丢失数据 (.
.\lib\nodejieba.cpp) [E:\xcloud2-doc\node_modules\nodejieba\build\nodejieba.vcxproj]
e:\xcloud2-doc\node_modules\nodejieba\lib\utils.h(17): 参见对正在编译的函数 模板 实例化“v8::Localv8::Array N
an::New<v8::Ar
ray,unsigned __int64>(A0)”的引用
with
[
A0=unsigned __int64
]
win_delay_load_hook.c
正在创建库 E:\xcloud2-doc\node_modules\nodejieba\build\Release\nodejieba.lib 和对象 E:\xcloud2-doc\node_modules\nod
ejieba
build\Release\nodejieba.exp
正在生成代码
已完成代码的生成
nodejieba.vcxproj -> E:\xcloud2-doc\node_modules\nodejieba\build\Release\nodejieba.node
[email protected] node_modules\nodejieba
└── [email protected]
close此bug
from nodejieba.
Related Issues (20)
- Unable to compile on Windows 11 with node-jieba 2.5.2/2.6.0 HOT 3
- The reason why installation failed on CentOS may be the version number
- 在老项目中 node 5.1.0,nodejieba v1.0.0,执行不下去的问题
- 老大,啥时候能解决v2.6.0发版问题呀 HOT 5
- README 中的文章都访问不了,大佬可以更新一下嘛,想看看实现思路 HOT 3
- 请问有没有同学遇到alinode(fully-static)动态加载的问题
- unable to install [email protected] for arch=aarch HOT 2
- Cannot build nodejieba with Node 18 HOT 2
- can not build in electron HOT 2
- 在線演示的網站倒了,打算轉用github pages或其他工具嗎?
- Does not segment 民不畏死 from the Tao Te Ching?
- Lacking of maintenance HOT 7
- Dict update
- 安装2.5.2失败 HOT 15
- 从2.6.0降低版本安装2.5.2 服务器报错 error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found HOT 1
- 安装,找不到 nodejieba包 HOT 1
- cannot build in electron 20, node 16
- nodejieba.node is not a valid Win32 application HOT 5
- npm i error HOT 1
- 为什么windows不支持了,binary没法下载
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejieba.