CopilotForXcode
CopilotForXcode copied to clipboard
Unavailable Node.js installed with nodenv(Anyenv)
My node is installed by nodenv(Anyenv), and install CopilotForXcode with brew cask.
which node
return /Users/username/.anyenv/envs/nodenv/shims/node
.
I write path to Path to Node, then show Server unavailable, please make sure installed Node.

refresh did not change error message.
so I tried to install Node with brew, rewrite Path to Node to /opt/homebrew/Cellar/node/19.8.1/bin/node
is fixed.

env
- node v19.8.1
- CopilotForXcode 0.8.6
Expected behavior
it maybe my environment, but I want to be able to specify Node with nodenv as well.
Please check your /Users/username/.anyenv/envs/nodenv/shims/node version, and make sure it's v16+
thanks😊
current my nodeenv node version is 19.8.1
I've downgraded v16.18.1, but it doesn't seem to change. 🤔
Please try setting up the language server manually by calling
/Users/username/.anyenv/envs/nodenv/shims/node /Applications/Copilot\ for\ Xcode.app/Contents/Applications/CopilotForXcodeExtensionService.app/Contents/Resources/copilot/dist/agent.js --stdio
here is response
Content-Length: 232
{"jsonrpc":"2.0","method":"LogMessage","params":{"level":0,"message":"[DEBUG] [agent] [2023-03-21T07:02:22.483Z] Agent service starting","metadataStr":"[DEBUG] [agent] [2023-03-21T07:02:22.483Z]","extra":["Agent service starting"]}}
I have tried that if I use the path that points to a specific version of Node installed via nodenv, it will work.
For example, Users/username/.nodenv/versions/19.8.1/bin/node
The node inside shims
is actually not a real node, if I understand it correctly, according to nodenv documentation:
Shims are lightweight executables that simply pass your command along to nodenv. So with nodenv installed, when you run, say, npm, your operating system will do the following:
- Search your PATH for an executable file named npm
- Find the nodenv shim named npm at the beginning of your PATH
- Run the shim named npm, which in turn passes the command along to nodenv
I will add it to FAQ in the next release.
I see. thanks!
I'm having the same problem and tried to set Path to Node to the specific path, but it didn't work
https://user-images.githubusercontent.com/3942121/226794972-0da5a718-0b63-4028-8b62-0ca1155930b4.mov
Am I missing something?
I'm having the same problem and tried to set Path to Node to the specific path, but it didn't work
Am I missing something?
Change ~ to /Users/yourusername and restart the app
Facing a similar issue using nvm
Facing a similar issue
![]()
![]()
restart the app and the helper
restart the app and the helper
The issue persists after restarting the helper and also restarting system.
Update: after switching to node v19.8.1, it is now working
I tried restarting the system and switched from node 18 nvm to node 19 with brew. Still not working for me


Please show me the error message
I tried restarting the system and switched from node 18 nvm to node 19 with brew. Still not working for me
![]()
![]()
Please show me the error message
Please show me the error message
I tried restarting the system and switched from node 18 nvm to node 19 with brew. Still not working for me
![]()
Please show me the error message Same as the others. Sorry for not including it 😅
@adiRandom I have tried version 19.8.1 from brew, and it works for me. To find out the cause, you can open Console.app to observe the logs post by the process CopilotForXcodeExtensionService
and subsystem com.chimehq.JSONRPC
https://github.com/intitni/CopilotForXcode/issues/63#issuecomment-1477386420
I have tried that if I use the path that points to a specific version of Node installed via nodenv, it will work.
For example,
Users/username/.nodenv/versions/19.8.1/bin/node
The node inside
shims
is actually not a real node, if I understand it correctly, according to nodenv documentation:Shims are lightweight executables that simply pass your command along to nodenv. So with nodenv installed, when you run, say, npm, your operating system will do the following:
- Search your PATH for an executable file named npm
- Find the nodenv shim named npm at the beginning of your PATH
- Run the shim named npm, which in turn passes the command along to nodenv
I will add it to FAQ in the next release.
I'm user of anyenv. This solution works for me! Thanks!!
I could set with changing "Path to Node" /Users/nukopy/.anyenv/envs/nodenv/shims/node
to /Users/nukopy/.anyenv/envs/nodenv/versions/18.7.0/bin/node
.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.