-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Websocket Module does not work with yarn workspaces #1149
Comments
+1 for removing it. |
I think the nohoist option shoud do it. Will give feedback tomorrow. However, I still think we should find another solution, even if I am able to fix it using nohoist. |
I am currently discussion with the owner of optional for a fix, but honestly the better way to go is to do not use something like optional packages, rather force the user to import a |
Kinda forgot about this issue. I fixed it indeed with the package.json {
[...],
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/@nestjs/",
"**/@nestjs/**"
]
}
} Here is a minimal reproduction of the bug: https://github.com/BrunnerLivio/nestjs-monorepo-starter/tree/nohoist-bug The README shows how it runs with or without the This bug is not urgent, since there is a working workaround. However I think hoisting will come more and more important in the NodeJS community. In my opinion there are more and more articles coming out because of the broken system npm has (example). Hoisting for example tries to fight against the enormous pile of redundant packages an |
Let's track this here #3035 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm submitting a...
Current behavior
The SocketModule gets imported using the library called "optional". Unfortunately optional has a bug , which does not resolve the node_modules path correctly.
Disclaimer: With yarn workspaces you have multiple node_modules folder. One in
${projectRoot}/node_modules
and multiple in${projectRoot}/packages/*/node_modules
. The package optional does not handle thisExpected behavior
It should correctly resolve the path, even with yarn workspaces.
I think we have to remove the library
optional
and find another way...Environment
Wow this issue cost me so much time to track down. So happy I finally found the cause.
The text was updated successfully, but these errors were encountered: