danwrong / restler

REST client library for node.js
MIT License
1.99k stars 389 forks source link

ES2015 strict mode - SyntaxError: Octal literals are not allowed in strict mode #234

Open crashuniverse opened 8 years ago

crashuniverse commented 8 years ago

We see a syntax error in node ES2015 strict mode. The error says:

/node_modules/restler/lib/multipartform.js:112
      fs.open(this.value.path, "r", 0666, function (err, fd) {
                                    ^^^^
SyntaxError: Octal literals are not allowed in strict mode.

It is important for us to fix it for staying compatible with latest modes of running the app. The moment I spotted this is because I use sendwithus in an app that has dependency on this package.

ES2015 strict mode is getting popular. I run my app using node --use_strict app.js for strict mode, that gives access to new features like let and many others.

mstumpf818 commented 7 years ago

I'm also having this issue