chuanyi / msexcel-builder

A simple and fast library to create MS Office Excel(>2007) xlsx files.
MIT License
184 stars 130 forks source link

SyntaxError: Octal literals are not allowed in strict mode #76

Open tolyanor opened 6 years ago

tolyanor commented 6 years ago

I try use msexcel-builder and got error:

/home/tln/www/nodejs/dreports/node_modules/msexcel-builder/lib/msexcel-builder.js:45
      if (!existsSync(target)) fs.mkdirSync(target, 0755);
                                                    ^^^^
SyntaxError: Octal literals are not allowed in strict mode.
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/tln/www/nodejs/dreports/toEmail.js:8:20)
    at Module._compile (module.js:571:32)

how I can resolve this error? I use node v4.3 Thanks!

zohaib545 commented 5 years ago

Could anybody solve this?

JonnoFTW commented 4 years ago

Change 0755 to 0o755, needs a pull request though and this project looks unmaintained.