remixer-dec / node-unnpk

npk archive unpacker
Apache License 2.0
6 stars 5 forks source link

Block-scoped declarations (let, const, function, class) not yet supported outside strict mode #2

Closed zombozo12 closed 6 years ago

zombozo12 commented 6 years ago

I just tried to unpack an npk and the node showed this error message.

   /usr/local/lib/node_modules/unnpk/unnpk.js:32

    let fparts = path.split("/");
    ^^^

  SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
     at exports.runInThisContext (vm.js:53:16)
     at Module._compile (module.js:374:25)
     at Object.Module._extensions..js (module.js:417:10)
     at Module.load (module.js:344:32)
     at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3
remixer-dec commented 6 years ago

Looks like you're using a very old version of Node. If you don't want to update it, you can try to add 'use strict' in the second line of unnpk.js