copilot-emacs / copilot.el

An unofficial Copilot plugin for Emacs.
MIT License
1.72k stars 122 forks source link

Recent changes might have broken it. #208

Closed yubrshen closed 7 months ago

yubrshen commented 7 months ago

I just updated copilot.el about 2 hours ago. When starting emacs as a daemon, I got the following error: Debugger entered--Lisp error: (jsonrpc-error "request id=1 failed:" (jsonrpc-error-code . -1) (jsonrpc-error-message . "Server died") (jsonrpc-error-data)) signal(jsonrpc-error ("request id=1 failed:" (jsonrpc-error-code . -1) (jsonrpc-error-message . "Server died") (jsonrpc-error-data))) jsonrpc-request(# initialize (:capabilities (:workspace (:workspaceFolders t)))) copilot--start-agent() copilot--on-doc-focus(#<window 1 on scratch>) copilot--mode-enter() copilot-mode()

rakotomandimby commented 7 months ago

@yubrshen , please check if #204 would be relevant for you. Also, it is better to quote an extract of the error message when reporting an issue.

yubrshen commented 7 months ago

Very likely this is of the problem of #204 I will close this one, and provide more detailed of the error infomation in my environment.

yubrshen commented 6 months ago

Indeed, the upstream of code of JavaScript has changed the required version of node from 16x to 18x. The version of node in mine had been 16.x, thus the server for copilot (started by node dist/agent.js) failed without any trace. After switching to node v18.19.0, it works now.

VictorYYW commented 2 months ago

Your solution is exactly what I am looking for. Thanks, @yubrshen!