SyntaxError: Invalid or unexpected token at createScript (vm.js:80:10)
It looks like there is some encoding
issue with the file that you're trying to run with Node
. Sometimes, files created with some command line utility does some encoding issues with the file. So, I would suggest not to use them to create file. Just create file with Right-Click > New File > app.js
and replace your old file with this app.js
. And try running node app.js
.