Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to use strict mode with NodeJS #49

Closed
JonDotsoy opened this issue Oct 23, 2015 · 5 comments
Closed

Failed to use strict mode with NodeJS #49

JonDotsoy opened this issue Oct 23, 2015 · 5 comments

Comments

@JonDotsoy
Copy link

> node --use-strict --harmony_modules --harmony_proxies --harmony_arrow_functions --harmony --es_staging lib/cli.js

...\node_modules\graceful-fs\graceful-fs.js:80
        open(req.path, req.flags || "r", req.mode || 0777, req.cb)
                                                     ^^^^

SyntaxError: Octal literals are not allowed in strict mode.
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:414:25)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (...\glob.js:39:10)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
npm ERR! Test failed.  See above for more details.

I found a solution, replace 0777 to 777 in graceful-fs.js:80 file.

@thisconnect
Copy link

Is that correct? becasue 0o777 octal seems to be 511

@thisconnect
Copy link

yup others use parseInt('0777', 8) which returns 511 .

@JonDotsoy
Copy link
Author

@isaacs
Copy link
Owner

isaacs commented Nov 4, 2015

This is already fixed on the latest release. Please upgrade.

@isaacs isaacs closed this as completed Nov 4, 2015
@JonDotsoy
Copy link
Author

​Great!!​

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants