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

Unable to install consumers: Unexpected strict mode reserved word in node_modules/ejs/postinstall.js #534

Open
cesine opened this issue Jul 20, 2020 · 0 comments

Comments

@cesine
Copy link

cesine commented Jul 20, 2020

Steps to reproduce

https://travis-ci.org/github/caolan/nodeunit/jobs/710077156

$ npm install

ejs@2.7.4 postinstall /home/travis/build/caolan/nodeunit/node_modules/ejs
node ./postinstall.js
/home/travis/build/caolan/nodeunit/node_modules/ejs/postinstall.js:9
let envDisable = isTrue(process.env.DISABLE_OPENCOLLECTIVE) || isTrue(process.
^^^
SyntaxError: Unexpected strict mode reserved word
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

Root cause

let was introduced in a patch version v2.7.2...v2.7.3 (before the major version 3.x was cut which dropped support for older node versions)

Impact

Several projects are unable to build, including projects which directly or indirectly on the 194 projects which depend on nodeunit which is an older "stale" project that was widely used on these older versions of node.

https://www.npmjs.com/package/nodeunit

Solution

I can help make the patch to convert let to var, if you can make a branch on the upstream to represent the 2.x releases

(diff that would fix: cesine#1)

@cesine cesine changed the title Unexpected strict mode reserved word Unable to install consumers: Unexpected strict mode reserved word in node_modules/ejs/postinstall.js Jul 20, 2020
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

1 participant