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

SyntaxError: Octal literals are not allowed in strict mode. [bug] #57

Closed
damianobarbati opened this issue Oct 12, 2017 · 3 comments
Closed

Comments

@damianobarbati
Copy link

My node runs by default in strict_mode, how to overcome this bug?

0|GoatSolo | /Users/damz/Desktop/goatsolo/node_modules/extract-zip/node_modules/mkdirp/index.js:19
0|GoatSolo |         mode = 0777 & (~process.umask());
0|GoatSolo |                ^^^^
0|GoatSolo | SyntaxError: Octal literals are not allowed in strict mode.
0|GoatSolo |     at createScript (vm.js:80:10)
0|GoatSolo |     at Object.runInThisContext (vm.js:139:10)
0|GoatSolo |     at Module._compile (module.js:588:28)
0|GoatSolo |     at Object.Module._extensions..js (module.js:635:10)
0|GoatSolo |     at Module.load (module.js:545:32)
0|GoatSolo |     at tryModuleLoad (module.js:508:12)
0|GoatSolo |     at Function.Module._load (module.js:500:3)
0|GoatSolo |     at Module.require (module.js:568:17)
0|GoatSolo |     at require (internal/module.js:11:18)
0|GoatSolo |     at Object.<anonymous> (/Users/damz/Desktop/goatsolo/node_modules/extract-zip/index.js:4:14)
@fczuardi
Copy link

fczuardi commented Apr 6, 2018

mkdirp 0.5.1 fixes this issue, so bumping the dependency should be enough see https://github.com/substack/node-mkdirp/commit/48e67fce39f1a5f2aba6196301b7be6d4545d6cf

@fczuardi
Copy link

fczuardi commented Apr 6, 2018

for any projects needing this fix, if you use yarn there is a workaround, you could use the resolutions field to have the 0.5.1 version as the only one installed. Manually add this to your package.json:

  "resolutions": { 
    "mkdirp": "^0.5.1" 
  } 

About this yarn feature: https://yarnpkg.com/lang/en/docs/selective-version-resolutions/

@fczuardi
Copy link

fczuardi commented Apr 6, 2018

or if you want to get a surgically specific override you could do something like this:

  "resolutions": {
    "@storybook/addon-storyshots/puppeteer/extract-zip/mkdirp": "^0.5.1"
  }

To have only the mkdirp used by extract-zip used by puppeteer used by @storybook/addon-storyshots modified :)

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

Successfully merging a pull request may close this issue.

2 participants