jieba.el
jieba.el copied to clipboard
(error "[JIEBA] Current backend: node is not available!")
doom emacs M-x jieba-forward-word
后报错 "Current backend: node is not available!"
emacs --debug-init
报错的backtrace:
Debugger entered--Lisp error: (error "[JIEBA] Current backend: node is not available!")
signal(error ("[JIEBA] Current backend: node is not available!"))
error("[JIEBA] Current backend: %s is not available!" node)
jieba--assert-server()
jieba--chinese-word-atpt-bounds(25 27)
jieba--move-chinese-word(nil)
jieba-forward-word(1)
funcall-interactively(jieba-forward-word 1)
call-interactively(jieba-forward-word record nil)
command-execute(jieba-forward-word record)
counsel-M-x-action("jieba-forward-word")
ivy-call()
...
config.el
中的配置:
(use-package! jieba
:load-path "~/node_modules/nodejieba"
;;:command jieba-mode
:init (jieba-mode))
nodejieba貌似是安装成功的
cli下 npm list
显示 [email protected]
Have you run npm i
in the plugin directory?
Thanks!
npm i
shows lots of packages deprecated, so I ran npm upgrade
and then npm i
, the result as follows.
While the "Current backend: node is not available!" issue persists.
➜ npm i
> [email protected] install
> node-pre-gyp install --fallback-to-build
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
[nodejieba] Success: "/Users/pallas/node_modules/nodejieba/build/Release/nodejieba.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
node-pre-gyp info ok
up to date in 1s
The issue persists after upgrading nodejieba to @2.5.1. (The local nodejieba module is working properly in terminal)
这个库作者还维护吗?这么久了这个还是open
这个库作者还维护吗?这么久了这个还是open
因为俺没法复现
This should be a problem with doom emacs
. More specifically, it's a problem with straight.el
. it just add .el files to the load path.
问题可能是在use-package
的:load-path
,它不能直接传字符串,要传一个函数(我看了我的配置才发现)
:load-path (lambda () "xxxx")