Cannot build frontend part due to type error

As you can see on the screenshot, the error is coming from isolatedModules flag not used in tsconfig.json in /build/web-app dir. This prevents building frontend. What fixes this is either use import type { Route } from '../../types' or adding a "isolatedModules": false to /build/web-app/tsconfig.json. But those are manual editions to the output files that is not desired. Anything that can be done on source side? To reproduce, just generate a simple project and following Get started section, and try to build build/web-app folder. I don't know if I am the only one hitting this
No description
13 Replies
IamIconLiving
IamIconLivingβ€’2y ago
because folder test/vitest/ does not exist in generated client folder, I assume it is being copied during generation process, like something like this? https://github.com/wasp-lang/wasp/blob/a87a9ca3ec367937b39f6830bfa573e2ca14c723/waspc/src/Wasp/Generator/WebAppGenerator.hs#L60 But I can't locate the actual file where it's being copied from, so maybe there is a quick and easy thing to fix - add type to import, unless I am missing something obvious
miho
mihoβ€’2y ago
Could you share wasp version output? πŸ™‚
IamIconLiving
IamIconLivingβ€’2y ago
sure!
wasp version
0.10.0

If you wish to install/switch to the latest version of Wasp, do:
curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s

If you want specific x.y.z version of Wasp, do:
curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s -- -v x.y.z

Check https://github.com/wasp-lang/wasp/releases for the list of valid versions, including the latest one.
wasp version
0.10.0

If you wish to install/switch to the latest version of Wasp, do:
curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s

If you want specific x.y.z version of Wasp, do:
curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s -- -v x.y.z

Check https://github.com/wasp-lang/wasp/releases for the list of valid versions, including the latest one.
miho
mihoβ€’2y ago
We did a couple of minor fixes, and if you could upgrade to 0.10.2 that would probably help. Just install it again with curl -sSL https://get.wasp-lang.dev/installer.sh | sh One of the fixes was adding the type next to Route reexport
IamIconLiving
IamIconLivingβ€’2y ago
gotcha! that's it, updated it and it worked!
miho
mihoβ€’2y ago
Let me know if it works for you πŸ™‚ Nice!
IamIconLiving
IamIconLivingβ€’2y ago
thank you!
miho
mihoβ€’2y ago
Thanks for the active feedback
IamIconLiving
IamIconLivingβ€’2y ago
in Wails, we have a built in version checker for the user, so if the user is on the outdated CLI version, we update them automatically or tell them to do it themselves so just an idea πŸ™‚
miho
mihoβ€’2y ago
That's a great idea πŸ‘ we were thinking about a version manager but adding automatic notice would be even better
IamIconLiving
IamIconLivingβ€’2y ago
as a side quest for myself, where are the files that you fixed the type in? I mean where are they located in project / or how are they generated, if that's not too much to cover for you? (don't want you to waste your time) I am just looking around and getting familiar with the project's codebase, so in case things like that popup, I'd be able to contribute with a fix or whatever
martinsos
martinsosβ€’2y ago
You can see the commit where type was added to the Route: https://github.com/wasp-lang/wasp/commit/949b462d21e3e112466b0e1fb042868f108356ad . It is a file in the "templates" -> Wasp has these templates that it then uses to actually generate JS project that you see in .wasp/. If you want to learn more about the codebase, good place to get a quick overview is reading https://github.com/wasp-lang/wasp/blob/main/waspc/README.md . Especially interesting might be https://github.com/wasp-lang/wasp/blob/main/waspc/README.md#codebase-overview . Feel free to ask more!
GitHub
wasp/README.md at main Β· wasp-lang/wasp
The fastest way to develop full-stack web apps with React & Node.js. - wasp/README.md at main Β· wasp-lang/wasp
IamIconLiving
IamIconLivingβ€’2y ago
thank you very much for guidance, very useful! dunno how I missed that /templates folder... but those links are great read!
Want results from more Discord servers?
Add your server