I'm getting this output when trying to install a node application using npm install
:
$ npm install
> ejs@2.7.4 postinstall /home/dh_8u42k7/quotegoodeair.com/node_modules/ejs
> node ./postinstall.js
/home/dh_8u42k7/quotegoodeair.com/node_modules/ejs/postinstall.js:9
let envDisable = isTrue(process.env.DISABLE_OPENCOLLECTIVE) || isTrue(process.
^^^
SyntaxError: Unexpected strict mode reserved word
I have already found this question which contains a workaround. However, this isn't my own code, so I can't just remove "let", it seems to be a problem with ejs
itself.
For another thing, the file postinstall.js
doesn't even exist, even the ejs
folder doesn't exist, so I can't just go in and edit the file.
Is there something wrong with my node application, or with ejs
, or maybe with npm
or Node itself? Why does Node install components which aren't supported by Node? Why does Node tell me there's an error in a file which doesn't exist?