IntelliJ Idea

‘env: node: No such file or directory’ Error in IntelliJ IDEA File Watcher

I was getting the following error when using the File Watcher feature in IntelliJ Idea to compile Typescript files:

/usr/local/bin/tsc –verbose –sourcemap test.ts
env: node: No such file or directory

The solution is relatively simple, you need to manually set the PATH environment variable in the File Watcher like so:

PATH variable in Idea File Watcher

 

You can get your environment’s PATH variable from ~/.MacOSX/environment.plist if you’re rocking a Mac. Alternatively you can probably use this one (again for a Mac):

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin

Posted by Dan in Guides, Mac, 6 comments