score:5

For me, this occurred as my path-to-regex had been updated to newer version.

I solved this by simply reverting back to the old version of path-to-regex.To do that simply run this: npm i path-to-regexp@2.4.0 --save

score:5

Instead of downgrading to an old version, just change the way you import: from:

import pathToRegexp from 'path-to-regexp';

to

import { pathToRegexp } from 'path-to-regexp';

Related Query

More Query from same tag