-
Notifications
You must be signed in to change notification settings - Fork 237
SyntaxError: Invalid regular expression during path-to-regexp conversion #868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Opened PR #869 to resolve this issue. |
Still a problem over here - any workarounds yet? |
I'm also still seeing this issue:
I also have a similar structure where I'm using Package.json
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I've encountered an issue when using express-openapi with my Express.js application. This application was based on a fresh installation.
The error I'm facing is as follows:
This error occurs when my application is starting up.
Here is my project structure:
Here is my package.json
Here is my code for the
test.js
,customer.js
, andcustomer/{id}.js
I am following the guidelines mentioned in the express-openapi documentation to structure my path files and use the {id} syntax for URL parameters.
Interestingly, I can access the /test route without any issues. However, I am not able to access the /customer by itself. I receive a 404 error. When adding the /customer/{id} file I receive the error detailed above.
The error seems to be related to the path-to-regexp module, but I'm not directly using this module in my code. It's being used internally by express-openapi.
I suspect the issue is due to the {id} file name, which could be getting passed as a part of the path to the path-to-regexp function.
If you could help me understand what's causing this error and how I could resolve it, I would greatly appreciate it. Please let me know if you need any further information. If you know better ways to debug this code or get a better error message, please let me know.
Thank you for your time and assistance!
The text was updated successfully, but these errors were encountered: