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

Octals in Node 4 strict mode #720

Closed
wesleyeff opened this issue Oct 7, 2015 · 2 comments
Closed

Octals in Node 4 strict mode #720

wesleyeff opened this issue Oct 7, 2015 · 2 comments

Comments

@wesleyeff
Copy link

I'm having an issue running winston in Node 4.1.2 strict mode. I get the following error. You can wrap octal literals in single quote to fix the issue. I have a pull request ready and have tested on Node 0.10, 0.12 and 4.1.

/winston/lib/winston/common.js:367
  fs.open(options.file, 'a+', 0644, function(err, fd) {
                              ^^^^

SyntaxError: Octal literals are not allowed in strict mode.
@ChALkeR
Copy link

ChALkeR commented Oct 10, 2015

@wesleyeff You shouldn't use --use-strict v8 option in Node.js. It changes the languange behavior in some cases, and might break modules that do not expect it. And you might even not notice the fact that something is broken until bad things happen.

Only the module author should decide if it's ok to force strict mode in his or her module, and he or she could do that by opting in for strict mode per-file.

@indexzero
Copy link
Member

This was fixed by #721.

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