Open sodic opened 8 months ago
I believe we solved this issues by using the dedupe
option in Vite. There were some build issues afterwards, but they seemed unrelated. I'll let @sodic close this when he thinks it's appropriate
I wouldn't close it until we figure out what's causing those build issues. Since they weren't happening unless we do dedupe
, they probably are related.
Some suggestions from the author of the React plugin for Vite that we use: https://github.com/vitejs/vite-plugin-react-swc/issues/184#issuecomment-1899964854
This issue is not react-specific. For example, if one of our inner dependencies (i.e, package.json files inside web-app and server) specifies prisma/client as a dependency, the runtime resolves to the wrong prisma/client installation and breaks.
We've temporarily avoided this problem by moving all the stuff that depends on prisma/client into sdk/package.json.
[no longer up to date] How to reproduce:
filip-project-install-step
waspc/examples/todo-typescript
rm -r .wasp node_modules package-lock.json migrations; cabal run wasp-cli db migrate-dev -- --name init && cabal run wasp-cli start
How to fix (temporarily):
./fix
and restart the app (withcabal run wasp-cli start
). This script deletes the redundant react installation and Vite's cache.Ideas on approaching the issue:
This question is related to the first bullet, but it might make sense to figure out what triggered this behavior now. The problem only appeared after I merged the auth stuff into the restructuring branches.
To compare the old build output with the new output, I recommend:
git checkout ea5a4c
rm -r .wasp node_modules package-lock.json migrations; cabal run wasp-cli db migrate-dev -- --name init && cabal run wasp-cli start
.wasp
folder with the folder you get when running the same command on the latest commit (here's a good extension for this).Possible solutions:
node_modules
folder higher up the directory tree with the installed package, as is the case for us)React
as SDK's peerDependency~ - tried it, doesn't work (see here)