I am using Intellij ultimate 2017.3 and installed nodejs plugin on it. My nodejs project requires babel to do the translation work from es5 to es6. In order to make Intellij to be able to debug my nodejs process, I added a file watcher plugin to listen on the source code changes. Once a file is changed, it will run below command to translate the code:
babel ./src --out-dir ./lib --source-maps
this command works fine from my OS but I get below error in Intellij:
env: node: No such file or directory
Process finished with exit code 127
I am using MacOS 10.13.1 and my node is managed by nvm which is at the v8.9.1. Babel is 6.26.0. Is there any problem in Intellij to call babel command? Or is it a babel or node environment problem on my OS?