IntelliJ Terminal not working - NodeJs Version
Answered
I have updated NodeJs version on my machine and can run angular CLI command on terminal and it works.
But when try to run same command on IntelliJ (V 2021.1.1) terminal it throws following error:
Node.js version v10.23.0 detected.
The Angular CLI requires a minimum Node.js version of either v12.14 or v14.15.
Please update your Node.js version or visit https://nodejs.org/ for additional instructions.
I am a mac user. macOS Big Sur.
How can I fix this issue so that I can use intelliJ terminal as the system terminal?
Thanks
Amin Kasbi
Please sign in to leave a comment.
What command do you use to change/set Node.js version in your system terminal? Also, what do your terminal preferences in Preferences | Tools | Terminal look like?
I just used the official Node installer for reinstalling the tools, went to the Node.js, select the version I wanted to install and did download and run it.

For the second question, pls. see attached.
Still you have at least 2 Node.js versions installed; do you use zsh in your system terminal? What is a result of running which node in your system and IDEA terminals?
Here is the result of which node on my IDEA System: /Users/aminkasbi/.node_modules/bin/node
what is IDEA System? I asked for results of running this command in your OS terminal and in IDEA built-in terminal. Also, what shell do you use for your OS terminal?
The result of which node no both terminals built-in IDEA and OS Terminal are different:
build-in IDEA: /Users/aminkasbi/.node_modules/bin/node
OS system terminal: /usr/local/bin/node
What do you mean exactly with IDEA System?
What is a result of running
echo $PATHin both terminals? What shell do you use for your system terminal?On built-in IDEA: /Users/aminkasbi/.node_modules/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Applications/VMware Fusion.app/Contents/Public /usr/local/MacGPG2/bin /Users/aminkasbi/SERVICE_LAYERS/appowner-app/node_modules/.bin
On OS System terminal: nothing, it's empty
Please share the output of the following command:
Here is the output:
grep: /Users/aminkasbi/.zshenv: No such file or directory
grep: /Users/aminkasbi/.zprofile: No such file or directory
/Users/aminkasbi/.zshrc:export PATH=~/.node_modules/bin:$PATH
grep: /Users/aminkasbi/.zlogin: No such file or directory
grep: /etc/zshenv: No such file or directory
grep: /etc/zlogin: No such file or directory
Thanks for reporting. It looks like an issue in the built-in terminal, because it behaves differently to your system terminal. OK, ~/.zshrc has "export PATH=~/.node_modules/bin:$PATH", this explains the issue. But the question is why your system terminal is not affected.
Please locate the following line in ~/.zshrc
and add the following line above it:
Then, save the changes in ~/.zshrc, open a new tab in the built-in terminal and run there these commands:
Please attach a screenshot (not copied text) of the built-in terminal.
Then, open a new tab in your system terminal and run there the same commands. Please attach a screenshot of the system terminal too. Please make sure that the screenshots contain whole terminal output starting with login information and ending with the last command output. Thanks!
I have correct Node version installed via NVM. Intellij doesn't see it and says:
The Angular CLI requires a minimum Node.js version of either v14.20, v16.14 or v18.10.
Node --version (in intellij terminal) shows:
v18.19.1
I don't understnad why Intellij see different version of node in different places. Why Angular Cli toolkit see different version than Intellij terminal ? terminal see correct version, but Angular cli tools in intellij says:
The Angular CLI requires a minimum Node.js version of either v14.20, v16.14 or v18.10.
Because they see different version and I had to manually dig for option to set proper version. It's weird because I use NVM and expect intellij to use system Node version instead of some "intellij preferences"
I fixed issue by specifying correct node version in Language & Frameworks -> Node.js. But why I have to spend my time to do it ?
Terminal uses the version from PATH environment. Make sure PATH contains the version you need. Project settings normally do not affect what tools are used in the Terminal.