Open
Description
Environment information
Version: v5.1.0
Platform: Linux 6.8.0-1021-aws 23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Node.js version: v16.20.2
Any other relevant information: N/A
What steps will reproduce the bug?
# Installing the latest express cause the issue
npm install express
then throws error
TypeError: Missing parameter name at 2: https://git.new/pathToRegexpError
at name (/var/www/<project>/node_modules/path-to-regexp/dist/index.js:73:19)
at lexer (/var/www/<project>/node_modules/path-to-regexp/dist/index.js:91:27)
at lexer.next (<anonymous>)
at Iter.peek (/var/www/<project>/node_modules/path-to-regexp/dist/index.js:106:38)
at Iter.tryConsume (/var/www/<project>/node_modules/path-to-regexp/dist/index.js:112:28)
at Iter.text (/var/www/<project>/node_modules/path-to-regexp/dist/index.js:128:30)
at consume (/var/www/<project>/node_modules/path-to-regexp/dist/index.js:152:29)
at parse (/var/www/<project>/node_modules/path-to-regexp/dist/index.js:183:20)
at /var/www/<project>/node_modules/path-to-regexp/dist/index.js:294:74
at Array.map (<anonymous>)
/var/www/<project>/node_modules/path-to-regexp/dist/index.js:73
throw new TypeError(`Missing parameter name at ${i}: ${DEBUG_URL}`);
Temporary Fix
Downgrade to 4.21.2
npm install express@4.21.2