-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Solve double installation issue in restructuring #1640
Comments
I believe we solved this issues by using the |
I wouldn't close it until we figure out what's causing those build issues. Since they weren't happening unless we do |
Some suggestions from the author of the React plugin for Vite that we use: vitejs/vite-plugin-react-swc#184 (comment) |
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. |
Note
Could be solved by #1838
[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:
How does the SDK resolve React? How does the user's code resolve React? How does our web app's code resolve React? We should figure out who uses which React installation
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)List- tried it, doesn't work (see here)React
as SDK's peerDependencyThe text was updated successfully, but these errors were encountered: