runtimeZero
runtimeZero

Reputation: 28116

Receiving strict mode warning while running node 4.4.7

I believe node v4.4.7 supports ES6. However node refuses to compile my program:

user1-$ node -v
v4.4.7

user1-$ node index.js
event-service.js:85
      let sql = 'SELECT * FROM group_events where id = ?';
      ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

I want to avoid 'use strict'. Any other options?

Upvotes: 0

Views: 293

Answers (1)

Orelsanpls
Orelsanpls

Reputation: 23545

run node --use_strict index.js to force it using strict mode

Upvotes: 2

Related Questions