The various installation options either support JetBrains' own lookup mechanisms such that JetBrains can find the proxy automatically, or allow the proxy to find nodenv-root automatically. Thus, IntelliJ/WebStorm can be configured to treat this proxy as the "package manager". This proxy conforms to the directory structure that JetBrains is hardcoded to find: the npm shim is at bin/npm-cli.js. (nor can they be found relative to nodenv's npm/yarn shims) How it works This means JetBrains will never find the npm-cli.js or yarn.js scripts, since they do not exist relative to nodenv's node shim. Of course, nodenv only resolves the true location of the node (or npm/yarn) executable at invocation time. Instead, it attempts to find the npm/yarn package directory, and invoke node with the bin/npm-cli.js or bin/yarn.js script. IntelliJ/WebStorm, for its own reasons, does not directly execute the npm or yarn executable found in PATH. (see for more details about JetBrains and environment variables) Why is this necessary? or modify the IDE desktop launcher to launch bash interactively or always launch IntelliJ/WebStorm from a terminal or source ~/.bashrc from ~/.profile or ~/.bash_profile set and export it in ~/.profile or ~/.bash_profile If you use a custom location for nodenv root, you must ensure NODENV_ROOT is set accordingly and exported in IntelliJ/WebStorm's environment in one of the following ways: The proxy should be able to derive your nodenv root location automatically.
If you use the default path of ~/.nodenv as your nodenv root, you're all set (ie, the directory that contains this proxy's package.json file) It should be set to the path where this proxy was installed. The package manager setting is found under: Languages & Frameworks -> Node.js and NPM -> Package manager.
Or you may need to paste in the full path manually.
It may be detected by the IDE automatically, in which case you merely need to select it. Regardless of your installation method, you will need to explicitly configure your package manager within IntelliJ/WebStorm. Yarn, in contrast, defaults to installing global packages to a single shared global directory outside the node version. Therefore, it's recommended to install this package globally using a system node, such that this package will live outside nodenv versions. This means the package will be removed if you nodenv uninstall the particular node version. Remember that global npm installs are still contained within the node version itself. Echo $(yarn global dir finally, ensure NODENV_ROOT is set in your IDE environment.īe aware which node is active when you install this package.