ERR_MODULE_NOT_FOUND : vscode-jsonrpc/node.js #264
|
Im getting some errors after trying to install the latest version of squad. (0.8.20) at the time. Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\x\AppData\Roaming\npm\node_modules@bradygaster\squad-cli\node_modules\vscode-jsonrpc\node' imported from C:\Users\x\AppData\Roaming\npm\node_modules@bradygaster\squad-cli\node_modules@github\copilot-sdk\dist\session.js Node.js v24.14.0 I tried to upgrade using npm install -g @bradygaster/squad-cli also tried an older version npm install -g @bradygaster/squad-cli@0.8.18 but i keep getting the same error when ever i type "squad" or "squad version" I was working an hour ago before trying to upgrade :) is there anything i can do to reset the npm, anyone have any suggestions ? I tried adding it using : "npm i vscode-jsonrpc" but still getting the error. anyone else having the same issue ? Have just tried "npm install -g @bradygaster/squad-cli@0.8.22" version aswell |
Replies: 2 comments
|
Found a temp workaround. Editing: change: to: |
|
Hey @LasseAtSparkron — this is the same root cause as #265, which you also filed (thank you for both reports!). What's happening: Workaround right now (v0.8.23): The global install does work on v0.8.23 — our postinstall script patches the broken file. If you're still seeing the error after
The key is that the postinstall script must run — it patches the broken import in the copilot-sdk. If npm uses a cached version, it may skip postinstall. npx will NOT work even on 0.8.23 — npx caches packages and skips postinstall scripts, so the patch never applies. Use global install instead. Fix coming in v0.8.24: We have added a runtime intercept ( Tracking in #265. Will close this discussion once the fix ships. |
Found a temp workaround.
Editing:
C:\Users\x\AppData\Roaming\npm\node_modules@bradygaster\squad-cli\node_modules@github\copilot-sdk\dist\session.js
change:
import { ConnectionError, ResponseError } from "vscode-jsonrpc/node";
to:
import { ConnectionError, ResponseError } from "vscode-jsonrpc/node.js";