For Windows users (maybe for Linux too):
You need to add the environment variable of R executables to the windows %PATH%.
1. Open the windows File Explorer
2. Right click on "My computer" or "This computer"
3. Click on properties
4. Click on advanced system configuration (something like that).
5. A windows pops-up
6. Click on environment variables
7. Click (highlight) the PATH variable
8. Click Edit...
9. Then add the path to the folder where your Rcmd, R.exe and Rscript.exe files are....
My path is: C:\Program Files\R\R-3.3.2\bin\x64
Because "Program Files" has a white space, the environment variable has to be added with double quotes, like:
"C:\Program Files\R\R-3.3.2\bin\x64" or else it won't work.
Then NodeJS's r-script package will be able to call the R command from any folder.
You can check if the environment variable was added by opening your CMD and entering "R" and then enter. If it says that the command is not recognized, then the variable wasn't correctly added. If it was correctly added, you will enter R console mode.
Close all CMD's and execute again your NodeJS app.