W
Wasp2w ago
Zuck

Started getting this randomly after a wasp clean

e: https://docs.sentry.io/api/auth/ [ Client!] error when starting dev server: [ Client!] Error: Failed to resolve entry for package "@tanstack/react-query". The package may have incorrect main/module/exports specified in its package.json. [ Client!] at packageEntryFailure (file:///Users/jacobferrari/wasupupdate/my-saas/app/.wasp/out/web-app/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:16198:15) [ Client!] at resolvePackageEntry (file:///Users/jacobferrari/wasupupdate/my-saas/app/.wasp/out/web-app/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:16195:3) [ Client!] at tryNodeResolve (file:///Users/jacobferrari/wasupupdate/my-saas/app/.wasp/out/web-app/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:16060:18) [ Client!] at ResolveIdContext.resolveId (file:///Users/jacobferrari/wasupupdate/my-saas/app/.wasp/out/web-app/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:15831:19) [ Client!] at EnvironmentPluginContainer.resolveId (file:///Users/jacobferrari/wasupupdate/my-saas/app/.wasp/out/web-app/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:42213:17) [ Client!] at async resolve (file:///Users/jacobferrari/wasupupdate/my-saas/app/.wasp/out/web-app/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:42802:12) [ Client!] at async file:///Users/jacobferrari/wasupupdate/my-saas/app/.wasp/out/web-app/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:42820:22 [ Client!] at async file:///Users/jacobferrari/wasupupdate/my-saas/app/.wasp/out/web-app/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:49047:16 [ Client!] at async file:///Users/jacobferrari/wasupupdate/my-saas/app/.wasp/out/web-app/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:14614:14 [ Client!] at async addManuallyIncludedOptimizeDeps (file:///Users/jacobferrari/wasupupdate/my-saas/app/.wasp/out/web-app/node_modules/vite/dist/n
165 Replies
kapa.ai
kapa.ai2w ago
Hi @Zuck. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The error you're seeing:
Error: Failed to resolve entry for package "@tanstack/react-query". The package may have incorrect main/module/exports specified in its package.json.
Error: Failed to resolve entry for package "@tanstack/react-query". The package may have incorrect main/module/exports specified in its package.json.
is likely related to issues with your node_modules or the way dependencies are resolved after running wasp clean. This kind of error can happen if: - There are conflicting or duplicate installations of dependencies (like React or React Query) due to node_modules folders higher up in your directory tree, or - The dependency tree is in a broken state after cleaning and reinstalling. Recommended steps: 1. Ensure Clean State:
Run the following commands in your project root:
wasp clean
rm -rf node_modules .wasp
npm install
wasp start

wasp clean
rm -rf node_modules .wasp
npm install
wasp start

This will remove all generated and installed files and reinstall everything fresh. 2. Check for Nested Projects:
If your Wasp app is inside another project that also has a node_modules or package.json (for example, inside a monorepo or another npm project), this can cause dependency resolution issues, especially with packages like React. Try moving your Wasp app outside of any parent npm project and repeat the clean/install steps above. This issue is documented as a known problem with Wasp apps inside other npm projects, particularly with React and related packages causing resolution conflicts Wasp apps inside NPM projects don't work. 3. Check for Double Installations:
There are known issues with double installations of dependencies (like React) in Wasp, which can cause similar errors. Cleaning out all node_modules and .wasp folders and reinstalling can help, but if the problem persists, check for any parent directories with their own node_modules Solve double installation issue in restructuring. If after these steps the error persists, please check if there are any additional error messages in your terminal or browser console, as they might provide more context. If your project is inside another npm project, moving it out is the most reliable fix according to the knowledge sources. Let me know if you need more help! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Zuck, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Zuck
ZuckOP2w ago
i moved my app folder into another empty one didnt fix it @kapa.ai
kapa.ai
kapa.ai2w ago
Let me check the knowledge base for you again. One moment! :books:
MEE6
MEE62w ago
Wohooo @Zuck, you just became a Waspeteer level 8!
kapa.ai
kapa.ai2w ago
---------------------- Since moving your app folder into another empty one did not fix the issue, here are some additional steps based on the knowledge sources: 1. Remove All Node Modules and Lock Files:
Make sure to delete all node_modules folders and lock files (package-lock.json or yarn.lock) in your project directory. Then, run a fresh install:
rm -rf node_modules .wasp package-lock.json
wasp clean
npm install
wasp start

rm -rf node_modules .wasp package-lock.json
wasp clean
npm install
wasp start

This approach has resolved similar issues for other users after a wasp clean operation, especially when something in the .wasp folder or node_modules was broken or out of sync Hey! Any ideas on some solutions to these errors?. 2. Check for Parent package.json or node_modules:
Even if you moved your app, ensure there are no package.json or node_modules folders in any parent directories (including your home directory). There are reports that having a package.json with dependencies like prisma or others in a parent directory can cause unexpected behavior and dependency resolution issues in Wasp projects If there is package.json above the Wasp project, prisma version from it will be used. 3. Dependency Conflicts:
If you have specified a different version of a dependency (like @tanstack/react-query) in your package.json than the one Wasp uses internally, this can cause conflicts. Wasp currently requires you to use the same version as it uses, or you may encounter errors Allow specifying npm dependency that Wasp already uses, with different version. If you have tried all of the above and the issue persists, the knowledge sources do not provide a more specific solution for this exact error. It may be a deeper issue with the dependency tree or a bug in the current Wasp version. In that case, sharing your package.json and the full error log with the Wasp community (e.g., on Discord or GitHub) may help identify the root cause. Let me know if you need more targeted troubleshooting! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Zuck, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Zuck
ZuckOP2w ago
@kapa.ai no i got nothing in my parent directory
kapa.ai
kapa.ai2w ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Thank you for clarifying that there is nothing in your parent directory that could interfere (no package.json or node_modules). Based on the knowledge sources, if you have already tried moving your app, running wasp clean, and reinstalling dependencies, but the error with @tanstack/react-query persists, there is no explicit solution or mention of this specific package resolution issue in the provided sources. The knowledge sources do confirm that similar issues can occur due to broken or out-of-sync node_modules or .wasp folders, and that running wasp clean followed by a fresh install usually resolves them. They also mention that dependency conflicts or double installations can cause problems, but do not provide further troubleshooting steps for your exact scenario beyond what you have already tried Hey! Any ideas on some solutions to these errors?. I'm sorry, but the knowledge sources do not contain enough information to provide a more specific solution for your current error with @tanstack/react-query. If the problem continues, it may be best to share your issue with the Wasp community for more targeted help. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Zuck, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Zuck
ZuckOP2w ago
so stumped I think this might be a very specific wasp bug
oasisenterprise
@Zuck I am running into this exact same issue, I cant seem to solve it. I have been able to deploy no issue last night. Went to do some work on my app and now this.
Zuck
ZuckOP2w ago
Woahhhhh this is weird @oasisenterprise Have you tired rolling back from wasp 16.4 to another version? I have a feeling it’s something super specific to 16.4 Because I’ve been debugging for hours
oasisenterprise
I did not, i mainly tried doing wasp cleans and rebuilds hoping it would fix it. I think you are right, I think its a wasp bug that needs to be fixed. @Wasp Expert any thoughts here?
Zuck
ZuckOP2w ago
Ya I only changed some client side code in between commits so it didn’t make sense this would happen
oasisenterprise
@Zuck from what I can gather and I am no expert it has to do with a mismatch in versions for tanquery. Wasp is expecting 4.29.0 but that is not a tanquery version option now. there is 4.29.1 but not 4.29.0
Zuck
ZuckOP2w ago
Ohh makes sense they must have gotten rid of that version Like tannery itself Tanstack*
oasisenterprise
Ya I am wondering if that is what happens and there maybe needs to be an update on wasp to work for new versions
Zuck
ZuckOP2w ago
Wouldn’t that break everyone’s wasp app then? Or at least whichever wasp has 4.29 installed
oasisenterprise
I would expect it to... I was suprised to only see 1 comment regarding this
genyus
genyus2w ago
Have you both tried the bot's suggestion of deleting the package-lock.json file in addition to wasp clean?
oasisenterprise
ya I ran rm -rf node_modules package-lock.json then wasp clean and then wasp build then wasp deploy fly deploy and got same error. @genyus
Zuck
ZuckOP2w ago
Yes @genyus yes many times And change my vite config
genyus
genyus2w ago
Does this only break in production, then? Not in your local environments?
oasisenterprise
ya local is fine its only on deployment @genyus
Zuck
ZuckOP2w ago
Broke in my local after a wasp clean @genyus Was working fine till I did a wasp clean locally But it broke in deployment first
oasisenterprise
ahh mine builds locally but I get this error now. when going to localhost just realized this.
No description
MEE6
MEE62w ago
Wohooo @oasisenterprise, you just became a Waspeteer level 2!
Zuck
ZuckOP2w ago
Ya I honestly don’t know enough but I don’t see 4.29.0 on npm anymore
No description
genyus
genyus2w ago
So the dependency hasn't changed between 0.16.3 and 0.16.4. And Wasp isn't expecting 4.29.0 as a pinned version; the dependency is ^4.29.0, which means >= 4.29.0 < 5.0.0 or in plain English, 'minimum of 4.29.0, maximum less than 5.0.0`, so updating should bring in the latest 4.x.x version So for example, in my local environment, the actual installed version is 4.36.1
Zuck
ZuckOP2w ago
Okay let me try updating it
genyus
genyus2w ago
If you look in .wasp/out/web-app/node_modules/@tanstack/react-query/package.json, what's the version number? If you're updating now, I'm assuming it should be 4.39.0?
oasisenterprise
I installed 4.39.0 the latest for tanquery and when I went to do wasp build again I get this now - Error: Dependency conflict for user dependency (@tanstack/react-query, ^4.39.0): Version must be set to the exactly the same version as the one wasp is using: ^4.29.0 @genyus
genyus
genyus2w ago
Yes, if you install it in your user package.json, the versions have to match. You can specify ^4.29.0 and it will still install the latest
Zuck
ZuckOP2w ago
i thought that was my case to but let me double check just wasp clean and wasp starting rn okay ya it says "version": "4.39.0", @genyus in node modules
oasisenterprise
same here, 4.39.0 in node module I updated package.json to be 4.29.0 and it builds locally now like you said but I get the same error I sent screenshot of earlier on localhost and the deploy gets same error. @genyus
Zuck
ZuckOP2w ago
and i dont have it in my package.json
genyus
genyus2w ago
Yes, you don't need it in your userland package.json. I'm just setting up a local app to test
oasisenterprise
@genyus thanks for the help on this. One note and not sure if it matters in an earlier message you said to check this If you look in .wasp/out/web-app/node_modules/@tanstack/react-query/package.json, what's the version number? If you're updating now, I'm assuming it should be 4.39.0? I just did this and I dont have a @tanstack directory in there. I do in my node_modules directory inside the app directory but not in the wasp/out one.
Zuck
ZuckOP2w ago
here is my full trace @genyus
genyus
genyus2w ago
Can you run wasp compile and check if you see it show up?
Zuck
ZuckOP2w ago
@oasisenterprise did you look at the top of the director where all the @'s are im going to return to the commit before this broke, i didnt make many changes will see if it works
oasisenterprise
ya I did @Zuck. I just ran the compile. I still dont see it.
No description
Zuck
ZuckOP2w ago
damn thats odd!
genyus
genyus2w ago
Very. @oasisenterprise Can you share your .wasp/out/web-app/package.json file?
Zuck
ZuckOP2w ago
alright its gotta be a wasp error, i just went back to my working commit and its still giving me the error now sorry wasp or tanstack specific
oasisenterprise
@genyus here it is. ```{ "name": "OpenSaaS", "version": "0.0.0", "private": true, "type": "module", "dependencies": {"axios": "^1.4.0" }, "devDependencies": {"@tsconfig/vite-react": "^2.0.0", "@types/react-dom": "^18.0.11", "@vitejs/plugin-react": "^4.2.1" }, "scripts": { "start": "vite", "build": "tsc --build && vite build" }, "engineStrict": true, "engines": { "node": ">=20.0.0" }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } }
genyus
genyus2w ago
I just set up a page using the QueryClientProvider and QueryClient, but can't yet reproduce
oasisenterprise
ya I am a tad perplexed cause I deployed last night it worked made no edits to code base came to computer tonight and error was there. @Zuck
genyus
genyus2w ago
So it's not including the dependency, which would explain why it's not showing in your node_modules. Can you remove the dependency you added to your package.json, then clean and rebuild?
Zuck
ZuckOP2w ago
Ya I just deployed like 2 hours ago. Then made a client side change and ran into this.
oasisenterprise
yep will do now one second
genyus
genyus2w ago
Is your project in an accessible repo, by any chance?
Zuck
ZuckOP2w ago
It’s in a private repo, huge project we’ve been working on for like a year now. Unfortunately I can’t give out access
oasisenterprise
@genyus I deleted dependency from package.json. i ran rm -rf node_modules package-lock.json && npm install then did wasp build. still dont see the directory in node modules.
Zuck
ZuckOP2w ago
But I can definitely get snippets of stuff
oasisenterprise
@genyus I can make my repo public for a short bit if you would like. Just dont steal my project idea lol
genyus
genyus2w ago
You can just add me as a contributor temporarily
oasisenterprise
ya that is probably a better route. I will do it now. @genyus whats your github username?
MEE6
MEE62w ago
Wohooo @oasisenterprise, you just became a Waspeteer level 3!
genyus
genyus2w ago
Same as here, genyus
oasisenterprise
perfect just added you
genyus
genyus2w ago
OK, understood. Can you share the contents of your @tanstack/react-query/build/lib/index.d.ts file? OK, will have a look now
Zuck
ZuckOP2w ago
Yes one sec! import './setBatchUpdatesFn'; export * from '@tanstack/query-core'; export * from './types'; export { useQueries } from './useQueries'; export type { QueriesResults, QueriesOptions } from './useQueries'; export { useQuery } from './useQuery'; export { useSuspenseQuery } from './useSuspenseQuery'; export { useSuspenseQueries } from './useSuspenseQueries'; export { defaultContext, QueryClientProvider, useQueryClient, } from './QueryClientProvider'; export type { QueryClientProviderProps } from './QueryClientProvider'; export type { QueryErrorResetBoundaryProps } from './QueryErrorResetBoundary'; export { useHydrate, Hydrate } from './Hydrate'; export type { HydrateProps } from './Hydrate'; export { QueryErrorResetBoundary, useQueryErrorResetBoundary, } from './QueryErrorResetBoundary'; export { useIsFetching } from './useIsFetching'; export { useIsMutating } from './useIsMutating'; export { useMutation } from './useMutation'; export { useInfiniteQuery } from './useInfiniteQuery'; export { useIsRestoring, IsRestoringProvider } from './isRestoring'; export { queryOptions } from './queryOptions'; //# sourceMappingURL=index.d.ts.map (sorry i cant find my code block key on this weird partially french keyboard i have lol) @genyus
genyus
genyus2w ago
This looks correct
genyus
genyus2w ago
When I compile your project, I get the expected dependencies in the .wasp directory.
No description
Zuck
ZuckOP2w ago
Does his run without the error on your machine @genyus Sorry hers, etc shouldn’t assume
oasisenterprise
I discared all the changes I did trying to fix this and ran wasp clean and build and now I see it there. the github repo version had my commit from last night when it deployed fine which is what I just built. but it still gave me same error when trying to access it on localhost or deploy haha you had it right first go... I am curious if my project builds for you. @genyus if your open to it would you want to try wasp start on it and see if you can get it to let you access it at localhost? Just make sure to kill the session after please haha.
genyus
genyus2w ago
I can't as I get db access error:
[ Db !] Error: P1010
[ Db !]
[ Db !] User `postgresWaspDevUser` was denied access on the database `OpenSaaS-009a7e3201.public`
[ Db !] Error: P1010
[ Db !]
[ Db !] User `postgresWaspDevUser` was denied access on the database `OpenSaaS-009a7e3201.public`
oasisenterprise
ahh ya that makes sense. Well I might call it a night and see if this gets fixed overnight/weekend. I will check this thread in the morning see if there are any updates. @genyus you still need repo access or you good now?
Zuck
ZuckOP2w ago
Ya I’m going to call it a night to! I have another dev working with us overseas trying to figure it out to, hopefully we can get to the bottom of it this weekend
genyus
genyus2w ago
I'm good, you can remove me. I just managed to get it started with a local db and can now reproduce the error
Zuck
ZuckOP2w ago
Oh perfect
oasisenterprise
makes me feel better it wasnt just us haha
genyus
genyus2w ago
I'll have a little dig, but shutting down soon too, so will look properly when I resurface
oasisenterprise
Do we think it is worth opening a github issue on the open-saas github page or give it a bit first?
Zuck
ZuckOP2w ago
I feel like when everyone wakes up they’ll be on it and @genyus is on it I’m sure it will be fixed tomorrow Unless in goes real deep
oasisenterprise
haha that is probably a good call. I will hold off.
genyus
genyus2w ago
It was a bug with the 4.39.0 release of react-query and has now been resolved with the 4.39.1 patch release. 😅 rimraffed my local clone 🗑️
oasisenterprise
thank you! you da man! Did you just update to 4.39.1 and all good? I could not find 4.39.1 in npm but installed 4.36.1 and everything seems to be working, was able to deploy to fly.io and run locally. @genyus really appreciate all your help here!
genyus
genyus2w ago
Apologies. My tired brain read 4.39.1, but it appears they've gone back to the previous version of 4.36.1
oasisenterprise
ahh that makes sense, ya i isntalled 4.36.1 and it is working perfect
A³Learn
A³Learn2w ago
I keep getting this as well - can't develop anymore as well, how did you do this? You modified it in your .wasp folder?
sabotage
sabotage2w ago
im not able to specify a working version either. i guess we're stuck waiting for 4.39.1 to hit npm? though i dont see that release in github either
A³Learn
A³Learn2w ago
I don't understand I thought we can't change the verision that wasp uses otherwise it hits up with the error that the versions have to match exactly
❌ --- [Error] Your wasp project failed to compile: -------------------------------

- Error: Dependency conflict for user dependency (@tanstack/react-query, ^4.36.1): Version must be set to the exactly the same version as the one wasp is using: ^4.29.0
❌ --- [Error] Your wasp project failed to compile: -------------------------------

- Error: Dependency conflict for user dependency (@tanstack/react-query, ^4.36.1): Version must be set to the exactly the same version as the one wasp is using: ^4.29.0
sabotage
sabotage2w ago
yeah, i cant figure out where wasp is injecting that.
A³Learn
A³Learn2w ago
Let me know if anyone has solved this! Or if it solved itself internally @Wasp Team just summoning you all - I get this when I make a new app as well
Fecony
Fecony2w ago
this is something different
No description
A³Learn
A³Learn2w ago
Yep we/I get this as well!
Fecony
Fecony2w ago
I guess the issue is that tanstack router 4.39 version releaased 9 hours ago is ꜱʜɪᴛ and they broke all of this https://publint.dev/@tanstack/[email protected]
publint
Lint npm packages to ensure the widest compatibility across environments
Fecony
Fecony2w ago
and because of ^ we get latest one, so maybe ~ for patches would be safer
miho
miho2w ago
Damn
martinsos
martinsos2w ago
All right here we are! Thanks for the ping @A³Learn . So what you pplz said is correct from what @miho just told me: react-query broke things with the latest version, and Wasp automatically picked it up because we use ^ as @Fecony noted. We should switch to more strict version range, probably ~ or even completely fixed since bugs can occur in patches also. What doesn't help is that we have new fancy version validation so we complain if you try to specify any version that doesn't match how we specify it - we might want to look into making that smarter. At the moment, there are two things we can do to fix this specific situation: 1. release a hotfix release of Wasp from our side that pins down the version of react-query more strictly 2. wait till the release a fix react-query release I am tempted to wait for (2) if it's going to happen soon, let's say today, if not then we do (1). And we will in any case look into more permanent solution Inthe following weeks to avoid this from repeating. Any idea what's happening on the react-query side, are they fixing it today?
Fecony
Fecony2w ago
I'm not sure tanstack is aware of the issue
martinsos
martinsos2w ago
@Fecony What is the issue actually, do you know?
Fecony
Fecony2w ago
dunno, I can see they did something wrong and released v4 or something, and lookign at that website there are no files
cosmin
cosmin2w ago
is there any workaround for this issue that i can do locally to be able to start a new project? i just started today to wasp and im curios to play around and see what it can do.
martinsos
martinsos2w ago
Thats what is tricky at the moment, due to us checking the versions, it is not so easy to tweak it locally. There is probably something you could do, I am guessing going into .wasp dir, under react-app, and possibly running npm install there to install older version of react query, but I am not 100% sure at the moment if that is enough + it might get reset at some point as project is restarted
Fecony
Fecony2w ago
GitHub
Broken react-query release v4.39.0 · Issue #9226 · TanStack/query
Describe the bug Coming from Wasp discord, users noticed that when project dependencies are installed latest release is broken, Wasp specifies version ^4.29.0 -&gt; 4.39.0 released 9 hours ago is i...
Fecony
Fecony2w ago
when was version check added? using wasp 16.3? or older?
A³Learn
A³Learn2w ago
I used 16.0 to 16.4 got the error for all
martinsos
martinsos2w ago
Yeah some time ago Give me a bit if time and I will look into us releasing a new Wasp release Miho and sodic are currently on the conference in Romania (JSHeroes) and I am sick with temperature (although better today) so that is why we are a bit slow
A³Learn
A³Learn2w ago
Get better soon! Thanks for the update and quick response
martinsos
martinsos2w ago
I blame react-query for doing a release on Friday who does that 😄
A³Learn
A³Learn2w ago
Disgruntled engineers 😃
martinsos
martinsos2w ago
Ok I am at my machine, let's get this fixed! @Fecony I see you created an issue on TanStack/query -> awesome, thanks for that. I will now get started with cutting out a hotfix for Wasp, I just need to remember how we do that, haven't done it in some time :D. Luckily we have nice instructions in the README.
lucky72o
lucky72o2w ago
Oh, glad I found this thread. Spent a couple of hours today trying to figure out what is wrong with my project 🙈 This issue is very scary, to be honest. I have my app live, and I worry that there's no way I can release any fixes if needed urgently..
Stefan Vitória
Facing this same issue. Happened out of nothing kkkk. I have a demo with a possible for a saas i built a few time ago. Wasp version 0.14.2 , any quick fi x for it? I am assuming it will be only for the new versions of wasp right?
martinsos
martinsos2w ago
Yeah you are right, and we will revise how we pin down these versions to avoid this from happening again! The hotfix I am working on right now -> yeah, for 0.16
lucky72o
lucky72o2w ago
thank you @martinsos
martinsos
martinsos2w ago
I am expecting they will also have a fix on react-query side soon so that should take care of that long term When do you have this demo @Stefan Vitória ? You want to run wasp start as a part of the demo if I got it right?
Zuck
ZuckOP2w ago
As long as people don’t wasp clean or start a new project they won’t run into this. But looks like tanquery team is on it as of 10 minutes ago
martinsos
martinsos7d ago
Ok great -> I am very close to releasing 0.16.5 also, that pins down the react-query version to 0.36.1 Building 0.16.5: https://github.com/wasp-lang/wasp/actions/runs/15363810696
Zuck
ZuckOP7d ago
🔥🔥 issue fixed! but ya should still work on something to prevent similar from happening again
martinsos
martinsos7d ago
@here I just released a new version of Wasp, 0.16.5, that pins down the react-query to 0.36.1, which should work fine (in theory, and in practice from what I tested so far). So just pull in the latest wasp CLI and you should be good! Additionally, as @Zuck noted, tanstack team is aware of react-query 0.39.0 being broken and they are fixing it. I can't say when they are going to have it fixed, but I am guessing quite soon, so this should do it for all of you using older wasp versions like 0.14, 0.15 and similar. This will also make the fix I did with 0.16.5 redundant, but I still released it so that you don't have to wait for tanstack fix. As for the future: we will create a GH issue based on this and look into preventing it from happening in the future. We will probably be pinning down exact versions. But we will also be looking into how to allow you to possibly have more flexibility in overriding the versions, and similar. This whole quarter we are focusing on making Wasp development faster on our side via better tests / CI / architecture so this will be natural addition to that. Oh damn they fixed it just as I released 😄 Nice, even better I think I will still let the release be, but let me know if any issues.
Zuck
ZuckOP7d ago
haha thanks for the hard work as well with the hot fix!!
martinsos
martinsos7d ago
What makes this tricky is that on one hand we want people to get the newest versions of packages Wasp uses, like react-query, but on the other hand, there is always a chance of one of these packages making a mistake like this, even if they are just releasing a patch. But on the other hand you want patches in case they are fixing a security issue. Solution is actually not to pin them down completely, but to give you some freedom on choosing the version yourself in the rare case when something goes wrong like this. But this requires some smart design on our side. We will be thinking about this soon.
Zuck
ZuckOP7d ago
Something for emergencies would be good. We could specify in main.wasp the package version we want to use. "for this project, use @tanstack/[email protected] despite Wasp's default," (put this in a nice syntax way) Wasp can product a terminal warning You are overriding Wasp's recommended version for @tanstack/react-query. This is an unsupported configuration and may lead to unexpected behavior or breakages. Proceed with caution." @martinsos like this in main.wasp: overrides { (“@tanstack/react-query”, “4.36.1”) } or via wasp config set-dep @tanstack/react-query 4.36.1. - During wasp start / build Wasp would: - merge those overrides into the generated package.json, print a bright warning (“unsupported dependency override, proceed at own risk”). - That keeps day-to-day DX simple while letting devs unblock themselves in rare cases. -- - The CLI already validates dependency versions—extend that code-path to (a) read optional overrides, (b) relax the “must match exactly” rule when an override is present. - Add a schema check so only whitelisted packages (React Query, React Router, etc.) can be overridden—avoid users accidentally breaking build tooling. - Tests: matrix CI job that spins up a sample Wasp app with a custom override to make sure the pipeline still passes.
martinsos
martinsos7d ago
Something in that direction. Ideal would be specifying those deps in top level package.json actually, and then wasp picking them up and using them. And checking that they match our version ranges for those, but yeah not as rigidly as we do now, but in a smarter way.
Zuck
ZuckOP7d ago
awesome ya makes sense!
Stefan Vitória
I did it already. It was today right before i sent the message here in discord. The app is on production, so everything went just fine. I just wanted to ship this new feature i wanted to show but its not big deal for the demo. But i will have to figure it out by Monday. I think i will have to update wasp for that project, because i am on 0.14.2 to get the hotfix you just did. The good news is that my saas got its first client. Its the second app i have built with wasp, i finished last year, November, when i was still learning about wasp kkkk. Now i think i am on my fourth or something
martinsos
martinsos7d ago
Great @Stefan Vitória ! Ok I am glad to hear all went well. They fixed react-query so all should be working fine for you on the Wasp side!
Stefan Vitória
This are wonderful news still facing the error tho Solved actually. Did wasp clean a start again. Everything seems to work fine
Fecony
Fecony7d ago
GitHub
Broken react-query release v4.39.0 · Issue #9226 · TanStack/query
Describe the bug Coming from Wasp discord, users noticed that when project dependencies are installed latest release is broken, Wasp specifies version ^4.29.0 -&gt; 4.39.0 released 9 hours ago is i...
Fecony
Fecony7d ago
oh right I was sleeping add INTERNAL_DO_NOT_USE_OR_YOU_WILL_GET_FIRED tag in wasp files to let user overrided anything 😹 I guess another hotfix users could do is to git patch wasp package and change version
Dada
Dada7d ago
does wasp update automatically or is there a command i should run to get the new version or delete the one i have and install again ?
Zuck
ZuckOP7d ago
@Dada command is in update and release notes channel And on wasp docs Just in car can’t get it
Dada
Dada7d ago
after the last issue with @tanstack/react-query , i updated my wasp version from 0.16.3 to 0.16.5. i run wasp clean , and deleted all package-lock.json and node_modules , deleted database container and volume and started fresh :
wasp start db
wasp db migrate-dev
wasp start
wasp start db
wasp db migrate-dev
wasp start
everything seem to run correctly except that the dev server doesnt start , the process quits after saying Starting up generated project ,here is the log:
root@Proxmox /home/dada/myapp/app # wasp start

:bee: --- Starting compilation and setup phase. Hold tight... ------------------------


:bee: --- Compiling wasp project... --------------------------------------------------


:white_check_mark: --- Successfully completed npm install. ----------------------------------------


:bee: --- Setting up database... -----------------------------------------------------


:white_check_mark: --- Database successfully set up. ----------------------------------------------


:bee: --- Building SDK... ------------------------------------------------------------


:white_check_mark: --- SDK built successfully. ----------------------------------------------------


:white_check_mark: --- Your wasp project has successfully compiled. -------------------------------


:bee: --- Listening for file changes... ----------------------------------------------


:bee: --- Starting up generated project... -------------------------------------------
root@Proxmox /home/dada/myapp/app # wasp start

:bee: --- Starting compilation and setup phase. Hold tight... ------------------------


:bee: --- Compiling wasp project... --------------------------------------------------


:white_check_mark: --- Successfully completed npm install. ----------------------------------------


:bee: --- Setting up database... -----------------------------------------------------


:white_check_mark: --- Database successfully set up. ----------------------------------------------


:bee: --- Building SDK... ------------------------------------------------------------


:white_check_mark: --- SDK built successfully. ----------------------------------------------------


:white_check_mark: --- Your wasp project has successfully compiled. -------------------------------


:bee: --- Listening for file changes... ----------------------------------------------


:bee: --- Starting up generated project... -------------------------------------------
MEE6
MEE67d ago
Wohooo @Dada, you just became a Waspeteer level 3!
martinsos
martinsos7d ago
True but it's a bit wild @Dada no error? That is weird! Try: - using older wasp version, e.g. 0.16.3 that you had previously (run wasp version for instructions how to install it), see if that helps, to eliminate potential issue with 0.16.5 itself. - if you create a new app, does it work?
Dada
Dada7d ago
@martinsos i have the @tanstack/react-query error with the older version , thats why i updated the new version
martinsos
martinsos7d ago
@Dada that error is now gone regardless of which wasp version you try to use, you will see itisgone with 0.16.3 also
Dada
Dada7d ago
ah okay i'll try
Dom
Dom7d ago
I'm still running into this issue with Wasp 0.15.0; I had the same issues as described above, deployed successfully just last night, but this afternoon it did not work anymore. I just ran wasp clean on my machine, and while it builds and runs normally on my local machine, I still cannot deploy it to fly.io. Any ideas why that happens?
martinsos
martinsos7d ago
@Dom , just to confirm, the issue is the one with react-query? If so, run wasp clean on your project, that should do it, since it will start using newer, non-broken version of react-query. You can also delete node_modules/ for extra thoroughness. Read above for more detailsif this doesn't help, please supply more info as to how issue is manifesting itself!
Dom
Dom7d ago
Ah sorry, I misread parts of my stack trace. For me the issue with .../node_modules/@tanstack/query-core/build/lib/queryClient I just saw the tanstack and figured that I have the same issue as the people before me. Since the wasp clean did not help I will try the node_modules manual deletion, since that is where the issue seems to be located
martinsos
martinsos7d ago
No worries! Feel free to share more info here, exact error message, that would help. Also, a question: do you possibly have react-query specified as a dependency in your package.json?
Dada
Dada7d ago
@martinsos here is the error when i went back to 0.16.3 🐝 --- Setting up database... ----------------------------------------------------- [ Db ] No difference detected. [ Db ] [ Db ] Environment variables loaded from .env [ Db ] Prisma schema loaded from ../db/schema.prisma [ Db ] Datasource "db": PostgreSQL database "OpenSaaS-e8928929b8", schema "public" at "localhost:5432" [ Db ] [ Db ] No migration found in prisma/migrations [ Db ] [ Db ] Database schema is up to date! [ Db ] Environment variables loaded from .env [ Db ] Prisma schema loaded from ../db/schema.prisma [ Db ] [ Db ] ✔ Generated Prisma Client (v5.19.1) to ./../../../node_modules/@prisma/client in 363ms [ Db ] ✅ --- Database successfully set up. ---------------------------------------------- 🐝 --- Building SDK... ------------------------------------------------------------ ✅ --- SDK built successfully. ---------------------------------------------------- ✅ --- Your wasp project has successfully compiled. ------------------------------- 🐝 --- Listening for file changes... ---------------------------------------------- 🐝 --- Starting up generated project... ------------------------------------------- wasp-bin: /home/dada/myapp/app/public/: getDirectoryContents:openDirStream: does not exist (No such file or directory)
martinsos
martinsos7d ago
Hm ok this is something else! Something going on with your public dir? You deleted it? Try creating public/ dir in specified location and see if that helps.
Dom
Dom7d ago
Thanks, I just tried it again after deleting the node_modules folder. The error message is still the same: 🔍 Validating environment variables... src/index.tsx(25,28): error TS2322: Type 'import("/Users/dom/Desktop/Wasp/opensaas-ql/app/node_modules/@tanstack/query-core/build/lib/queryClient").QueryClient' is not assignable to type 'import("/Users/dom/Desktop/Wasp/opensaas-ql/app/.wasp/build/web-app/node_modules/@tanstack/query-core/build/lib/queryClient").QueryClient'. Types have separate declarations of a private property 'queryCache'. file:///Users/dom/.local/share/wasp-lang/0.15.1/data/packages/deploy/node_modules/zx/build/core.js:146 let output = new ProcessOutput(code, signal, stdout, stderr, combined, message); <- line with error
martinsos
martinsos7d ago
Thanks I will ping rest of the Wasp team to check this out. @miho @sodic Can you just check for me if you maybe have react-query specified as a dependency in your package.json? Because if you do, removing that is probably the way to go.
Dom
Dom7d ago
I didn't make any changes to my package.json file, so it still looks like this:
{
"name": "opensaas",
"type": "module",
"dependencies": {
"@aws-sdk/client-s3": "^3.523.0",
"@aws-sdk/s3-request-presigner": "^3.523.0",
"@faker-js/faker": "8.3.1",
"@google-analytics/data": "4.1.0",
"@headlessui/react": "1.7.13",
"@lemonsqueezy/lemonsqueezy.js": "^3.2.0",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.7",
"apexcharts": "^3.41.0",
"clsx": "^2.1.0",
"headlessui": "^0.0.0",
"node-fetch": "3.3.0",
"openai": "^4.55.3",
"prettier": "3.1.1",
"prettier-plugin-tailwindcss": "0.5.11",
"react": "^18.2.0",
"react-apexcharts": "^1.4.1",
"react-hot-toast": "^2.4.1",
"react-icons": "4.11.0",
"stripe": "11.15.0",
"tailwind-merge": "^2.2.1",
"vanilla-cookieconsent": "^3.0.1",
"wasp": "file:.wasp/out/sdk/wasp",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/express": "^4.17.13",
"@types/react": "^18.0.37",
"prisma": "5.19.1",
"typescript": "^5.1.0",
"vite": "^4.3.9"
}
}
{
"name": "opensaas",
"type": "module",
"dependencies": {
"@aws-sdk/client-s3": "^3.523.0",
"@aws-sdk/s3-request-presigner": "^3.523.0",
"@faker-js/faker": "8.3.1",
"@google-analytics/data": "4.1.0",
"@headlessui/react": "1.7.13",
"@lemonsqueezy/lemonsqueezy.js": "^3.2.0",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.7",
"apexcharts": "^3.41.0",
"clsx": "^2.1.0",
"headlessui": "^0.0.0",
"node-fetch": "3.3.0",
"openai": "^4.55.3",
"prettier": "3.1.1",
"prettier-plugin-tailwindcss": "0.5.11",
"react": "^18.2.0",
"react-apexcharts": "^1.4.1",
"react-hot-toast": "^2.4.1",
"react-icons": "4.11.0",
"stripe": "11.15.0",
"tailwind-merge": "^2.2.1",
"vanilla-cookieconsent": "^3.0.1",
"wasp": "file:.wasp/out/sdk/wasp",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/express": "^4.17.13",
"@types/react": "^18.0.37",
"prisma": "5.19.1",
"typescript": "^5.1.0",
"vite": "^4.3.9"
}
}
martinsos
martinsos7d ago
Hm those are e2e tests for opensaas, that doesn't look right, that is not or shouldn't be your top level package json All right you fixed it
Dom
Dom7d ago
Yes, just realized that. Edited my original message
martinsos
martinsos7d ago
No worries. Hm I am a bit out of ideas at the moment but guys will have more ideas for sure
Dom
Dom7d ago
Thank you nonetheless! It struck me that my experience was similar to what the others described and that it is also related to the @tanstack module, but as it appears to be a different component I am out of ideas as well
MEE6
MEE67d ago
Wohooo @Dom, you just became a Waspeteer level 3!
Dom
Dom7d ago
I'll give this another crack tomorrow
martinsos
martinsos7d ago
Yup it does look like something else, but it doesn't mean there isn't a connection (although unlikely). On Monday we should have our experts in 😄 so I believe they will have a better idea!
Dom
Dom6d ago
Just to add additional context: I tried it again and it still does not work, but deploying my server works (as it has yesterday). The error message happens when it tries to deploy the client to fly.io. I have no issues with the local development server, that works perfectly. Problem solved - updating to Wasp 0.16.5 fixed this issue for me as well 😁
miho
miho6d ago
Great to hear 🙏
martinsos
martinsos5d ago
That is weird because I only pinned down the react-uery verison :D! I wonder if in the process something got "uncached". In any case, great to hear it works now!
Stefan Vitória
i think something is still wrong, or i am doing something wrong. Its working locally but when i deploy the app, during the process, i get this error: src/index.tsx(25,28): error TS2322: Type 'import("/home/runner/work/gim-pass/gim-pass/app/node_modules/@tanstack/query-core/build/lib/queryClient").QueryClient' is not assignable to type 'import("/home/runner/work/gim-pass/gim-pass/app/.wasp/build/web-app/node_modules/@tanstack/query-core/build/lib/queryClient").QueryClient'. Types have separate declarations of a private property 'queryCache'. i am on wasp 0.14.2 and deploying to my vps, using @miho gist Asking for some help to quick fix it because i need to ship some features
Dom
Dom3d ago
Did you try upgrading to Wasp 0.16.5? That's what worked for me, I was on 0.15.1 before and it did not work with that Wasp version
Dom
Dom3d ago
I followed this guide, it is just a few adjustments to yur existing codebase: https://wasp.sh/docs/migration-guides/migrate-from-0-15-to-0-16
Stefan Vitória
Actually avoiding to go that way to save some time but i guess that might be the only way
Dom
Dom3d ago
Been there, done that - but I ended up upgrading after not finding another workaround for two days 😄 You can give it a try and if it still doesn't work, downgrade back to 0.14.2 (been through this cycle as well before upgrading for good)
Stefan Vitória
You had to downgrade again?
Dom
Dom3d ago
No no, before I found the migration guide the upgrade created new error messages, so I downgraded again. Then I followed the migration guide, upgraded for good, and have been using 0.16.5 since then
martinsos
martinsos3d ago
@Stefan Vitória , this is very likely something being cached. Old problematic version of react-query maybe. So clean any caches. node_modules, try also creating new package-lock.json. Are you getting this error from GitHub action btw? I see "runner". What about cleaning up the cache there if you are using it? What also @Dom says, upgrading might've easier than you think. But try first with really cleaning up any caches that might keep old react-query. Right now I am betting on it being cached somewhere up there, where you are building your app Btw why upgrading to 0.16.5 works: because it forces a very specific version of react-query to be used, so even if problematic version of react-query is in the available node_modules, cached from before, it will not use it, but install the good one. While all the other versions specify range and so even though they could use the newest, fixed version of react-query, they will instead happily use the broken one if they find it already in node_modules. That is why purging those node_modules will do the job, you just need to figure out where are they And well they are ih /home/runner/work/gim-pass/gim-pass/app/node_modules, I just don't know where that is for you, which machine, cloud or something
Stefan Vitória
Yes its from github action, during the Client build job.
martinsos
martinsos3d ago
Ok then that node_modules is getting cached up there it seems
genyus
genyus3d ago
Try adding the following to your workflow before the build step:
- name: Clear npm cache
run: npm cache clean --force
- name: Clear npm cache
run: npm cache clean --force
Stefan Vitória
it didnt worked. Sa me issue. I am working on updating the wasp version to latest
martinsos
martinsos3d ago
If I am correct npm cache clean ... won't delete package from node_modules. Instead you either need to svict caches on GitHub Actions, or you can add a line that deleted those node_modules: rm -r /home/runner/work/gim-pass/gim-pass/app/node_modules
toticozeni
toticozeni3d ago
You can clean the cache on github actions manually
toticozeni
toticozeni3d ago
e.g. on our runner-action repo, just click the delete (trashcan) icon
No description

Did you find this page helpful?