Closed Grunticus03 closed 5 years ago
Ok, so I unzipped this repo to /etc/textbelt
then executed npm install which then installed all the dependencies. When I run nodejs ./server/app.js
I get the following error:
/etc/textbelt/server/app.js:51
let { message } = req.body;
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
So I nano app.js and change the curly braces to parenthesis and run nodejs ./server/app.js
again. This time, I get the following error:
/etc/textbelt/lib/text.js:6
let config = require('./config.js');
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/etc/textbelt/server/app.js:5:14)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
Hello, late reply but it looks like you're using an old version of node without ES6 support.
When executing
nodejs /server/app.js
, I get the following error: