-
Notifications
You must be signed in to change notification settings - Fork 73
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
path-to-regexp is not listed in dependencies #346
Comments
Ugh, never mind, I was looking for the dependency to be declared in the websockets package but I see you've got it declared in core. |
Double ugh, so my situation is that I am using a marblejs in a mono-repo. Some other project has a dependency on path-to-regexp that is really old. Using yarn resolutions I am able to get the right path-to-regexp installed for marblejs BUT because path-to-regexp is not declared as dependency on the websockets package (it is only on the core package) then when using mapToServer it finds the old path-to-regexp. Add a global resolution for path-to-regexp to 6.1.0 fixes it but this isn't the correct fix as the resolution should only be necessary for websockets. To better explain, here is my resolutions section in package.json: {
"resolutions": {
"@marblejs/core/path-to-regexp": "^6.1.0",
"@marblejs/websockets/path-to-regexp": "^6.1.0",
"react-router/path-to-regexp": "^1.7.0",
"path-to-regexp": "^6.1.0"
}
}
|
I added dependency-cruiser to my project and found similar mistakes where I was using a dependency without declaring it in package.json (so easy to do with a monorepo). The default generated rules for dependency-cruiser would have caught that @marblejs/websockets was using path-to-regexp without it being declared... |
@matthewpflueger ... sorry for my late response but I have a lot of other stuff to do besides my Opensource "job". I'll try to prioritize your findings and will back to you with my suggesions and feedback. 🙌 |
Here is the problem: As you suggested, the solution is to add |
No worries and totally get it - appreciate you taking a look! |
Describe the bug
On a fresh install of dependencies, followed by a compile then run of the code in issue #345 I ran into this error immediately:
To Reproduce
Before running the code in #345 I deleted the node_modules, did a fresh install, and compiled/ran bumping into this error. The package path-to-regexp is not listed in marblejs dependencies anywhere that I saw and I think I ran into a version upgrade of the path-to-regexp that is incompatible...
Expected behavior
For the mapToServer operator to not throw an error...
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: