Open YueRen opened 1 month ago
I'm facing a somewhat similar problem. The *copilot events*
buffer shows the error below. And indeed it looks for the installation in the wrong path, as running copilot-install-server
executes
/opt/homebrew/bin/npm -g --prefix /Users/shmulikregev/.emacs.d/.cache/copilot install copilot-node-server\@1.31.0
which installs to /Users/shmulikregev/.emacs.d/.cache/copilot/lib/node_modules/copilot-node-server
.
I'm using the latest (at the time of writing) revision (733bff26
) and a development version of emacs 30.0.50 . Worth noting, it was working perfectly and for some reason, without any explicit updates on my part, stopped.
Any help would be appreciated (it is somewhat surprising how I got accustomed to using it).
[stderr] node:internal/modules/cjs/loader:1145
[stderr] throw err;
[stderr] ^
[stderr]
[stderr] Error: Cannot find module '/Users/shmulikregev/.emacs.d/.cache/copilot/bin/copilot-node-server'
[stderr] at Module._resolveFilename (node:internal/modules/cjs/loader:1142:15)
[stderr] at Module._load (node:internal/modules/cjs/loader:983:27)
[stderr] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
[stderr] at node:internal/main/run_main_module:28:49 {
[stderr] code: 'MODULE_NOT_FOUND',
[stderr] requireStack: []
[stderr] }
[stderr]
[stderr] Node.js v21.7.1
update - for what it is worth 7a45181f
does not have this problem.
I have been getting difficulties getting copilot to start for a week or two. I have emacs installed via snap on Ubuntu 22.04 and here is a minimal
init.el
:And here is the error I get in
*Messages*
when I runM-x copilot mode
After seeing that copilot had difficulties finding an
agent.js
, I managed to get it running by adding the following to my configuration:Is there a bug in how
copilot--base-dir
is set, or is something missing in the README installation instructions, or is something wrong with my system?