Closed Jhonathan-Pedroso closed 1 year ago
The default value of copilot-node-executable
is either node
or node.exe
, depending on the platform. It is used to directly locate the node
executable, as shown in this link: https://github.com/zerolfx/copilot.el/blob/9694981880b9fed7ced4ccff4e60fc072290c9a4/copilot.el#L142.
Therefore, the behavior you described seems strange because nothing should be cached. I suggest evaluating (locate-file "node" exec-path)
and (call-process "node" nil standard-output nil "--version"))
in your Emacs to find out the reason.
I will update the readme to include copilot-node-executable
in the setup instructions.
I am trying to setup copilot for the first in my
emacs v28.1
. After adding the elisp code~/.emacs.d/myinit.org
, evaluating the code block, and next attempting to execute the stepM-x copilot-login
, it display the error message:user-error: Node 16+ is required but found 12.22 [2 times]
In the first occurrence of the error, I checked and indeed was the case of under version; but even after I updated to the version
v16.20.1
; it still persist displaying the error.My guess: It seems some global variable was set, and its state pointing the version or the executable was not updated; persisting triggering the error even after the update. Probably, something related to the variable
copilot-node-executable
, that it is not properly captured after the updated during theM-x copilot-login
step.My workaround:
I did the following after the elisp code that was to setup
copilot
:This is working for me.
Maybe adding in the
readme.md
documentation this step, or fixing thecopilot.el
would be a nice idea for others avoiding this bug. I hope the issue helps! Thanks in facilitating this awesome tool in emacs, great job!