M
Manifestโ€ข3mo ago
Ergo

TypeError on endpoints with fresh react project

Hi! This is likely user error, I'm not too experienced with NodeJS.
[Nest] 13196 - 06/19/2025, 6:36:17 PM ERROR [ExceptionsHandler] (0 , path_to_regexp_1.match) is not a function
TypeError: (0 , path_to_regexp_1.match) is not a function
at EndpointService.matchRoutePath (C:\Programming\Source\Web\test\node_modules\manifest\dist\manifest\src\endpoint\endpoint.service.js:37:56)
at MatchEndpointMiddleware.use (C:\Programming\Source\Web\test\node_modules\manifest\dist\manifest\src\endpoint\middlewares\match-endpoint.middleware.js:23:59)
at C:\Programming\Source\Web\test\node_modules\@nestjs\core\router\router-proxy.js:9:23
at middlewareFunction (C:\Programming\Source\Web\test\node_modules\@nestjs\core\middleware\middleware-module.js:166:28)
at Layer.handle [as handle_request] (C:\Programming\Source\Web\test\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Programming\Source\Web\test\node_modules\express\lib\router\route.js:149:13)
at Route.dispatch (C:\Programming\Source\Web\test\node_modules\express\lib\router\route.js:119:3)
at Layer.handle [as handle_request] (C:\Programming\Source\Web\test\node_modules\express\lib\router\layer.js:95:5)
at C:\Programming\Source\Web\test\node_modules\express\lib\router\index.js:284:15
at param (C:\Programming\Source\Web\test\node_modules\express\lib\router\index.js:365:14)
[Nest] 13196 - 06/19/2025, 6:36:17 PM ERROR [ExceptionsHandler] (0 , path_to_regexp_1.match) is not a function
TypeError: (0 , path_to_regexp_1.match) is not a function
at EndpointService.matchRoutePath (C:\Programming\Source\Web\test\node_modules\manifest\dist\manifest\src\endpoint\endpoint.service.js:37:56)
at MatchEndpointMiddleware.use (C:\Programming\Source\Web\test\node_modules\manifest\dist\manifest\src\endpoint\middlewares\match-endpoint.middleware.js:23:59)
at C:\Programming\Source\Web\test\node_modules\@nestjs\core\router\router-proxy.js:9:23
at middlewareFunction (C:\Programming\Source\Web\test\node_modules\@nestjs\core\middleware\middleware-module.js:166:28)
at Layer.handle [as handle_request] (C:\Programming\Source\Web\test\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Programming\Source\Web\test\node_modules\express\lib\router\route.js:149:13)
at Route.dispatch (C:\Programming\Source\Web\test\node_modules\express\lib\router\route.js:119:3)
at Layer.handle [as handle_request] (C:\Programming\Source\Web\test\node_modules\express\lib\router\layer.js:95:5)
at C:\Programming\Source\Web\test\node_modules\express\lib\router\index.js:284:15
at param (C:\Programming\Source\Web\test\node_modules\express\lib\router\index.js:365:14)
I get this error when trying to access a dynamic endpoint. Interestingly, this doesn't happen on a fresh project with only manifest. So yeah, probably my fault. ๐Ÿ˜… Minimum reproduction:
npx create-react-app@latest test
npx add-manifest
npx create-react-app@latest test
npx add-manifest
added to backend.yml:
endpoints:
test:
path: /test
handler: test
method: GET
endpoints:
test:
path: /test
handler: test
method: GET
manifest/handlers/test.js:
module.exports = async (req, res) => {
res.json({ message: 'Hello world from my new endpoint!' })
}
module.exports = async (req, res) => {
res.json({ message: 'Hello world from my new endpoint!' })
}
node/npm:
PS C:\Programming\Source\Web\test> node -v
v24.2.0
PS C:\Programming\Source\Web\test> npm -v
11.4.2
PS C:\Programming\Source\Web\test> node -v
v24.2.0
PS C:\Programming\Source\Web\test> npm -v
11.4.2
2 Replies
brunobuddy
brunobuddyโ€ข3mo ago
Hello @Ergo thank you so much for reporting that issue I could reproduce it on Windows + Node 24 and created a patch that fixes this issue. Indeed the path-to-regexp package is not present on that configuration so I had to import it specifically. You can just set the manifest version to 4.12.3 by typing npm i manifest@latest and it should work now ! https://github.com/mnfst/manifest/releases/tag/manifest%404.12.3
GitHub
Release manifest@4.12.3 ยท mnfst/manifest
Patch Changes c74b428: fixed path error on windows with handler files, thanks @akvgergo
Ergo
ErgoOPโ€ข3mo ago
So it was a bug ๐Ÿ˜„ good to know it wasn't just me Thank you for the quick fix ๐Ÿ˜Š

Did you find this page helpful?