My node version is 4.3.2(npm 2.15.5) while installing the express version 3.3.4 I am facing this issue. Earlier it used to work fine. I guess recent changes in that version are causing the problem.
I guess recent changes in that version are causing the problem.
Express version 3.3.4 was published 5 years ago, and haven't been modified since (you can't modify versions on npm).
Are you sure that the error is coming from code inside of the express lib?
(also, I would recommend moving to Express 4.x, and a more recent version of Node.js as well)
Yes, I am pretty sure the error is coming from inside the library and to be particular in the file node_modules/express/node_modules/debug/src/index.js
To reproduce the issue just switch to node version 4.3.2 using nvm. Install express version 3.3.4 and this file would have 'let' and 'const' used. While the earlier instance of the node_modules I have has 'var' used. I am also very much surprised how an already published library got updated.
Ah right, I think that we depended on "debug": "*" at some point 馃
Could you try with express 3.21.2?
I guess it is working with 3.21.2, but still curious how the 3.3.4 version changed 馃
The 3.3.4 version didn't change, but it had a dependency on "debug": "*" which installed a version of debug that used a newer syntax that only works in Node.js 6 and newer.
If you want to avoid these problems in the future, use a version of npm that supports package-lock.json files and commit that file to your repository.
Thank you, closing this issue.
Most helpful comment
Thank you, closing this issue.