You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On trying to get started with express-openapi on a Windows development environment, I got a nasty error about Unmatched ')' in a regular expression. Trying to hunt it down led me to fs-routes where files are being resolved.
Using path.resolve on Windows resolves paths with back slashes and on Linux, forward slashes. Code further down the line seems to assume all path separators are forward slashes. This means that some of the generated routes will become invalid and lead to broken code.
I changed the end of the fsRoutes() function to look like
Is there a better way of handling this? I was a little surprised no one else had stumbled across this error so it leads me to believe I'm doing something wrong.
The text was updated successfully, but these errors were encountered:
I've already fixed this with PR877. Unfortunately, there is no maintenance for months by the author of this project... Hopefully this will change again in future...
I've been dealing with the same issue for a couple of weeks until I posted on StackOverflow and fortunately, @Narretz pointed me to this channel where finally my suspicion is confirmed.
Thnx!!
On trying to get started with express-openapi on a Windows development environment, I got a nasty error about Unmatched ')' in a regular expression. Trying to hunt it down led me to fs-routes where files are being resolved.
Using path.resolve on Windows resolves paths with back slashes and on Linux, forward slashes. Code further down the line seems to assume all path separators are forward slashes. This means that some of the generated routes will become invalid and lead to broken code.
I changed the end of the fsRoutes() function to look like
as a test and that fixed the issues I was having.
Is there a better way of handling this? I was a little surprised no one else had stumbled across this error so it leads me to believe I'm doing something wrong.
The text was updated successfully, but these errors were encountered: