Invalid or unexpected token with JavaScript set up to use nodejs
Posted: Tue Dec 18, 2018 1:41 pm
Product, version and build: PrimalScript Version 7.4.118 64 bit
Operating system: Windows 10 Pro 64 bit
I've set up JavaScript to use node.js. When I try and run just a simple program such as...
I get the following error in the output window...
D:\How Tos\nodejs\myHello.js:1
(function (exports, require, module, __filename, __dirname) { ��c
^
SyntaxError: Invalid or unexpected token
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
Execution time: < 1 second
Exit code: 1 , 0001h
I'm not sure where those characters after the "{" are coming from. Here's my settings for JavaScript...
Operating system: Windows 10 Pro 64 bit
I've set up JavaScript to use node.js. When I try and run just a simple program such as...
Code: Select all
console.log('Hello world!');
D:\How Tos\nodejs\myHello.js:1
(function (exports, require, module, __filename, __dirname) { ��c
^
SyntaxError: Invalid or unexpected token
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
Execution time: < 1 second
Exit code: 1 , 0001h
I'm not sure where those characters after the "{" are coming from. Here's my settings for JavaScript...