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 this13 Replies
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 obviousCould you share
wasp version
output? πsure!
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
reexportgotcha! that's it, updated it and it worked!
Let me know if it works for you π
Nice!
thank you!
Thanks for the active feedback
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 π
That's a great idea π we were thinking about a version manager but adding automatic notice would be even better
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
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
thank you very much for guidance, very useful! dunno how I missed that
/templates
folder... but those links are great read!