kilocode icon indicating copy to clipboard operation
kilocode copied to clipboard

Node.js executable not found when using nvm on Ubuntu

Open lailuping opened this issue 1 month ago • 3 comments

Plugin Type

JetBrains Plugin

App Version

4.109.2

Description

The Kilo plugin for JetBrains IDEs fails to detect Node.js executable when it is installed via nvm (Node Version Manager) on Ubuntu systems.

Reproduction steps

Bug Report: Node.js executable not found when using nvm on Ubuntu

Description

The Kilo plugin for JetBrains IDEs fails to detect Node.js executable when it is installed via nvm (Node Version Manager) on Ubuntu systems.

Environment

System Information

CPU Architecture: amd64 Operating System: Linux 6.14.0-33-generic IDE Version: IntelliJ IDEA 2025.2.4 (build IU-252.27397.103) Plugin Version: 4.109.2 JCEF Support: Yes

Error Message

java.lang.Throwable: Failed to find Node.js executable
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:375)
	at ai.kilocode.jetbrains.core.ExtensionProcessManager.start(ExtensionProcessManager.kt:81)
	at ai.kilocode.jetbrains.plugin.WecoderPluginService$initialize$1.invokeSuspend(WecoderPlugin.kt:333)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:130)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:613)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:1183)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:778)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:765)

Steps to Reproduce

  1. Install Node.js using nvm on Ubuntu system
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
    source ~/.bashrc
    nvm install node
    
  2. Verify Node.js is available in terminal:
    node --version
    npm --version
    
  3. Install and configure Kilo plugin in JetBrains IDE
  4. Attempt to use Kilo plugin functionality that requires Node.js

Expected Behavior

The plugin should detect the Node.js executable installed via nvm and function properly.

Actual Behavior

The plugin fails to find the Node.js executable and throws the error shown above.

Additional Context

When Node.js is installed via nvm, it's typically located in ~/.nvm/versions/node/v[version]/bin/node and the PATH is modified by shell scripts. The plugin appears to be looking for Node.js in standard system paths but not checking the nvm installation directory or respecting the modified PATH.

Possible Solutions

  1. Check for nvm installation directory (~/.nvm/versions/node/)
  2. Respect the user's PATH environment variable which should include the nvm path
  3. Allow manual configuration of Node.js path in plugin settings
  4. Implement nvm-specific detection logic

Workaround

Users can potentially work around this by:

  1. Creating a symbolic link from a standard location to the nvm Node.js executable
  2. Setting the Node.js path manually if the plugin supports it
  3. Using a system-wide Node.js installation alongside nvm

System Information

lai@lai:~$ which node /home/lai/.nvm/versions/node/v22.21.0/bin/node lai@lai:~$ echo $PATH /home/lai/.nvm/versions/node/v22.21.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/lai/.local/share/JetBrains/Toolbox/scripts lai@lai:~$ ls -la ~/.n .node_repl_history .nuget/ .nvm/ lai@lai:~$ ls -la ~/.nvm/versions/node/ 总计 12 drwxrwxr-x 3 lai lai 4096 10月 26 21:37 . drwxrwxr-x 3 lai lai 4096 10月 26 21:37 .. drwxrwxr-x 6 lai lai 4096 10月 26 21:37 v22.21.0 lai@lai:~$

Provider

No response

Model

No response

System Information

CPU Architecture: amd64 Operating System: Linux 6.14.0-33-generic IDE Version: IntelliJ IDEA 2025.2.4 (build IU-252.27397.103) Plugin Version: 4.109.2 JCEF Support: Yes

lailuping avatar Oct 26 '25 13:10 lailuping

I can't test the plugin because of this bug 😥

peorth80 avatar Nov 04 '25 23:11 peorth80

Same here using remote development over SSH where on the host Node.js was installed via npm (as the version in apt repos is reported as too old).

jmakov avatar Nov 14 '25 11:11 jmakov

I've worked around by adding two symbolic links like this:

which node >/dev/null && sudo ln -sf "$(which node)" /usr/local/bin/node which npx >/dev/null && sudo ln -sf "$(which npx)" /usr/local/bin/npx

--> Kilo Code works like a charm on my Ubuntu machine

micha77dd avatar Nov 27 '25 11:11 micha77dd