Ensure the different generated packages are using the same transitive dependencies · Issue #2726 · wasp-lang/wasp · GitHub
More Web Proxy on the site http://driver.im/
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
Currently, we have no mechanism to ensure that transitive dependencies are the same across the different packages of a Wasp app (user code, generated sdk, server, and client).
For example, in #2672, the following version mismatch was creating a typechecking error in the todo-typescript example:
todo-typescript $ npm why engine.io
engine.io@6.5.4
node_modules/engine.io
engine.io@"~6.5.2" from socket.io@4.7.5
node_modules/socket.io
socket.io@"^4.6.1" from wasp@1.0.0
.wasp/out/sdk/wasp
wasp@1.0.0
node_modules/wasp
wasp@"file:.wasp/out/sdk/wasp" from the root project
todo-typescript $ (cd .wasp/build/server && npm why engine.io)
engine.io@6.6.4
node_modules/engine.io
engine.io@"~6.6.0" from socket.io@4.8.1
node_modules/socket.io
socket.io@"^4.6.1" from the root project
Important
Please note that both packages request socket.io@^4.6.1, but one is installing socket.io@4.8.1, and the other socket.io@4.7.5.
This happens because the package-lock.json from the server is being regenerated on each build, so it picks up new versions, but the one from the user code isn't, so it's stuck in the old one.
We need a mechanism to share dependencies, to ensure that such situation doesn't happen.
The text was updated successfully, but these errors were encountered:
A possible solution would be #1653. Another could be to add the SDK as a dependency of the server and client, to ensure that its dependencies would be taken into account when resolving the dependency tree, and thus would share them when appropriate.
Currently, we have no mechanism to ensure that transitive dependencies are the same across the different packages of a Wasp app (user code, generated sdk, server, and client).
For example, in #2672, the following version mismatch was creating a typechecking error in the
todo-typescript
example:Important
Please note that both packages request
socket.io@^4.6.1
, but one is installingsocket.io@4.8.1
, and the othersocket.io@4.7.5
.This happens because the
package-lock.json
from the server is being regenerated on each build, so it picks up new versions, but the one from the user code isn't, so it's stuck in the old one.We need a mechanism to share dependencies, to ensure that such situation doesn't happen.
The text was updated successfully, but these errors were encountered: