explorer
explorer copied to clipboard
`express` v5 breaking changes
express v5 was released recently and picked up by our bot:
https://github.com/ripple/explorer/pull/1160
v5 introduced breaking changes discussed here: https://github.com/expressjs/express/issues/6038#issuecomment-2405558639
Which caused error in production deployment:
/explorer/node_modules/path-to-regexp/dist/index.js:73
throw new TypeError(`Missing parameter name at ${i}: ${DEBUG_URL}`);
^
TypeError: Missing parameter name at 1: https://git.new/pathToRegexpError
at name (/explorer/node_modules/path-to-regexp/dist/index.js:73:19)
at lexer (/explorer/node_modules/path-to-regexp/dist/index.js:91:27)
at lexer.next (<anonymous>)
at Iter.peek (/explorer/node_modules/path-to-regexp/dist/index.js:106:38)
at Iter.tryConsume (/explorer/node_modules/path-to-regexp/dist/index.js:112:28)
at Iter.text (/explorer/node_modules/path-to-regexp/dist/index.js:128:30)
at consume (/explorer/node_modules/path-to-regexp/dist/index.js:152:29)
at parse (/explorer/node_modules/path-to-regexp/dist/index.js:183:20)
at /explorer/node_modules/path-to-regexp/dist/index.js:294:74
at Array.map (<anonymous>)
We have rolled back to v4 for now. We will need to fix our paths to align with new convention of v5 and also safeguard against this kind of issue either in our tests or CI (the error was not detected in both local build and CI)