The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
Block scoped Declaration not yet supported outside strict mode for node cache module
What I Wanted to Do
We have a node project where we automated all the unit tests using mocha.We tested all the unit tests on Windows and Linux system but when it comes to Ubuntu tests cases are failing due to below error.
Block scoped Declaration not yet supported outside strict mode which is pointing to node-cache module
All the test cases should pass on Ubuntu system
What Happened Instead
Block scoped Declaration not yet supported outside strict mode.
Use node-cache module in your project and consume that in any one of the unit test.
$ npm --versions 6.4.1 $ node -p process.platform Ubuntu bionic 18.04 node --version 10.15.0 Note we tried all the stuffs by changing node version from 10.15.0 to 6.14.x,8.x.x but didn't get any luck.
I did some searches and most of the matching reports are about needing to update node, but you are using an LTS version. Is that the version being run when the error occurs, or is something like
babel being invoked?
You could provide some more explicit reproduce steps, like a repo to clone and a command to run, but it does not look like an npm issue.