Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在window环境测试发现npm run download下载后运行会发生
Emitted 'error' event on Database instance at:
] {
errno: 1,
code: 'SQLITE_ERROR'
}
经过研究发现是下载路径的问题,于是尝试新增了一小段判断环境并且下载win x86/64的小代码
根据测试在window环境下如果存在中文目录
会出现错误
2022-10-22 23:51:12 D:\a_temp\windows\cppjieba\src\cppjieba\include\cppjieba\DictTrie.hpp:203 FATAL exp: [ifs.is_open()] false. open C:\Users\lihengdao\Desktop\github椤圭洰\sqlite\simple\examples\node\lib\dict\jieba.dict.utf8 failed.
尝试修改
node-sqlite3.js文件中的
var dict_path = path.join(ext_path, "dict");
为
var dict_path = "./lib/dict";
问题得到解决
但是其他环境下没有确定是否也存在该问题以及能否正常运行
个人开发能力不强
斗胆尝试提交一下
多有冒犯
希望大佬不要介意