Codux Help Center
Browse our articles to find the answers you need
Configuring Git and Node.js Paths
You need to have Git and Node.js installed on your computer to work with Codux. When Codux loads, it attempts to locate your Git and Node.js installations by looking at your PATH environment variable. Because there are many locations where Git and Node.js might be installed, we've included the ability to customize where Codux will look for them through a file named codux.settings.json (not to be confused with
codux.config.json
).codux.settings.jsonĀ
To specify shell or path settings for Git and Node.js, create a
codux.settings.json
file in your user folder. For example, on Windows systems, create the file here:1
C:\Users\[user]\codux.settings.json
On macOS systems, that translates to:
/Users/[user]/codux.settings.json
On Linux machines:
/home/[user]/codux.settings.json
This file accepts one of these two properties:
Property | Type | Description |
---|---|---|
shell | string | The absolute path to the shell (such as bash or zsh), which Codux will use to read the PATH environment variable and to run npm scripts. |
additionalPaths | string[] | If Codux can't find Node.js or Git even when they're installed, you can provide a list of additional directories to look in. This should be a list of absolute paths, e.g., ['/usr/local/bin', '/opt'] |
Note:
This configuration doesn't support relative paths from the root of the user directory (e.g.,
~/<PathToNode>
). Make sure to use absolute paths instead. Also, if you decide to adjust the PATH environment variable in your shell config file, make sure you're changing the one that runs at login. For example, for bash, it's ~/.bash_login
or ~/.bash_profile
, but not ~/.bashrc
.Example usage looks like this in
codux.settings.json
:1 2 3 4 5 6
{ "shell": "/bin/bash", "additionalPaths": [ "/Users/[user]/node-v18.14.0-darwin-x64/bin" ] }
Important!
Windows path backslashes have to be escaped. For example:
C:\\Users\\[user]\\[path-to-module-binary-folder]
Note:
Codux will validate the paths when it loads and notify you of any issues.
Was this article helpful?