W
Wasp3mo ago
YuehLin

wasp deploy issue

I'm using github action to do the deploy for my app. The deploy is working fine 4 days ago and my local docker also building wasp without any issue. I verified github action is using latest wasp version (0.16.5). But now I ran into the similar issue happened couple days ago:
../../../src/signalgen/client/operations.ts(612,17): error TS2742: The inferred type of 'useGetAllTemplates' cannot be named without a reference to 'wasp/node_modules/@tanstack/react-query'. This is likely not portable. A type annotation is necessary.
/home/runner/.local/share/wasp-lang/0.16.5/data/packages/deploy/node_modules/zx/build/core.cjs:416
const output = self._output = new ProcessOutput(dto);
^
../../../src/signalgen/client/operations.ts(612,17): error TS2742: The inferred type of 'useGetAllTemplates' cannot be named without a reference to 'wasp/node_modules/@tanstack/react-query'. This is likely not portable. A type annotation is necessary.
/home/runner/.local/share/wasp-lang/0.16.5/data/packages/deploy/node_modules/zx/build/core.cjs:416
const output = self._output = new ProcessOutput(dto);
^
I also tried to deploy from local with these commands
wasp clean
wasp build
wasp deploy fly deploy
wasp clean
wasp build
wasp deploy fly deploy
but no luck with it. "@tanstack/react-query": "4.36.1", this is listed in the package-lock.json so not sure why it stop working again
4 Replies
kapa.ai
kapa.ai3mo ago
Hi @YuehLin. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry, but the knowledge sources do not contain enough information to provide a definitive answer to your specific deployment issue with the TS2742 error and the reference to @tanstack/react-query in the context of Wasp 0.16.5 and GitHub Actions. However, I can share some relevant findings from similar issues: - There have been previous issues with type resolution and module paths during deployment that did not appear in local development, often related to differences in how dependencies are resolved or built in CI/CD environments versus local setups. For example, a similar error about missing modules during deployment was resolved by upgrading Wasp to a newer version that included a bug fix for dependency resolution. Ensuring you are on the latest Wasp version is a good step, which you have already done. In one case, upgrading from Wasp 0.12.3 to 0.12.4 fixed a deployment issue related to module imports, so version mismatches or missing dependencies in the build environment can be a cause of such errors Issue with deploying my wasp app to fly.io. - The error message you are seeing (TS2742: The inferred type of 'useGetAllTemplates' cannot be named without a reference to 'wasp/node_modules/@tanstack/react-query') suggests a TypeScript type resolution problem, possibly due to how node_modules are structured or how dependencies are hoisted in the build environment. There have been discussions about Wasp's node_modules and SDK packaging, and issues can arise if there are multiple versions or unexpected layouts of dependencies Figure out Wasp's node_modules story. - In some cases, cleaning the build artifacts and node_modules, then reinstalling dependencies, has helped resolve similar issues. You mentioned running wasp clean and wasp build, which is good, but you might also try deleting node_modules and package-lock.json entirely and reinstalling, both locally and in your CI environment. - If you are using custom patches or have made changes to dependencies, ensure that these are up to date and compatible with the current versions in use, as outdated patches can cause build failures Getting Wasp Compilation Error since Yesterday. If these steps do not resolve your issue, I recommend opening a detailed issue on the Wasp GitHub repository with your error logs and environment details, as this may be a regression or a new edge case not covered in the current documentation or known issues. Let me know if you need help with anything else related to Wasp! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @YuehLin, 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?
toticozeni
toticozeni3mo ago
So even local deploy with wasp clean didn't work? And it was the same error as above? I thought that maybe Github actions cached a version of wasp which had the tanstack-query error, but it might not be then.
YuehLin
YuehLinOP3mo ago
Yes local deploy with wasp clean doesn't work as well and showing same error. I don't see any caches under actions in Github.
MEE6
MEE63mo ago
Wohooo @YuehLin, you just became a Waspeteer level 2!

Did you find this page helpful?