bx2
bx2
WWasp-lang
Created by bx2 on 10/20/2024 in #🙋questions
[plugin:vite:import-analysis] Failed to resolve import "../../../../src/clientSetup" from "src/index
🍻
21 replies
WWasp-lang
Created by DanjelDurmo on 10/19/2024 in #🙋questions
Flask server in wasp
you will need to run the flask via uvicorn or gunicorn or other wsgi server available out there. alternativelly, just use poco's recommendation described in their documentation: https://flask.palletsprojects.com/en/3.0.x/tutorial/deploy/#run-with-a-production-server
8 replies
WWasp-lang
Created by bx2 on 10/20/2024 in #🙋questions
[plugin:vite:import-analysis] Failed to resolve import "../../../../src/clientSetup" from "src/index
I’m still thinking about it. I just started with the ts-based config. I see a lot of potential benefits to just coding everything in JS/TS. I’ll keep you posted.
21 replies
WWasp-lang
Created by bx2 on 10/20/2024 in #🙋questions
[plugin:vite:import-analysis] Failed to resolve import "../../../../src/clientSetup" from "src/index
perhaps there is something happening in the compiler. anyway, thanks for responding to this.
21 replies
WWasp-lang
Created by bx2 on 10/20/2024 in #🙋questions
[plugin:vite:import-analysis] Failed to resolve import "../../../../src/clientSetup" from "src/index
what i mean is that types in the appSpec.ts seem correctly set to optional? https://github.com/wasp-lang/wasp/blob/7ef2a34409d0fda9acdb4747934522bf8cf23ba2/waspc/packages/wasp-config/src/appSpec.ts#L199 I am perhaps missing something. I am new to Wasp's codebase.
21 replies
WWasp-lang
Created by bx2 on 10/20/2024 in #🙋questions
[plugin:vite:import-analysis] Failed to resolve import "../../../../src/clientSetup" from "src/index
@Vinny (@Wasp) it is weird though because even updating typescript types did not help here - granted i only took a few minutes to debug, but let me know if you will need any help or additional info.
21 replies
WWasp-lang
Created by bx2 on 10/20/2024 in #🙋questions
[plugin:vite:import-analysis] Failed to resolve import "../../../../src/clientSetup" from "src/index
@kapa.ai you can mark this one as solved.
21 replies
WWasp-lang
Created by bx2 on 10/20/2024 in #🙋questions
[plugin:vite:import-analysis] Failed to resolve import "../../../../src/clientSetup" from "src/index
If anyone else will encounter this issue (i think this is missing from the migration documentation): 1. If you are overwriting the root component via client, you have to:
app.client({
rootComponent: { import: 'App', from: '@src/App' },
setupFn: { importDefault: 'setup', from: '@src/clientSetup' },
});
app.client({
rootComponent: { import: 'App', from: '@src/App' },
setupFn: { importDefault: 'setup', from: '@src/clientSetup' },
});
Note that setupFn is ALWAYS required - it will not compile otherwise. You cannot pass in null, or anything other that the object that matches the ts-defined type. this also means that you will require an empty clientSetup file (it is not created automatically). this file can look like this:
export default function setup() {}
export default function setup() {}
with the above changes, the migration tutorial will work. I think that ideally, the setupFn would not be needed at all.
21 replies