Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(error "[JIEBA] Current backend: node is not available!") #9

Open
pallas42 opened this issue Nov 23, 2020 · 6 comments
Open

(error "[JIEBA] Current backend: node is not available!") #9

pallas42 opened this issue Nov 23, 2020 · 6 comments

Comments

@pallas42
Copy link

pallas42 commented Nov 23, 2020

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 显示 nodejieba@2.4.2

@cireu
Copy link
Owner

cireu commented Nov 23, 2020

Have you run npm i in the plugin directory?

@pallas42
Copy link
Author

pallas42 commented Nov 24, 2020

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

> nodejieba@2.4.2 install
> node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.14.0
node-pre-gyp info using node@15.0.1 | 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)

@wanghuibin0
Copy link

这个库作者还维护吗?这么久了这个还是open

@cireu
Copy link
Owner

cireu commented Nov 26, 2021

这个库作者还维护吗?这么久了这个还是open

因为俺没法复现

@Hxppdv
Copy link

Hxppdv commented Aug 25, 2022

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.

@barddust
Copy link

barddust commented Sep 28, 2022

问题可能是在use-package:load-path,它不能直接传字符串,要传一个函数(我看了我的配置才发现)

:load-path (lambda () "xxxx")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants