windmill
windmill copied to clipboard
bug: absolute import used in flow cannot be used for autocomplete
Describe the bug
When using import {} from "/f/xx/xx.ts", the autocomplete features won't work.
To reproduce
- Create a script
/f/test/test.ts - Create a flow, create a new inline bun script, write
import {} from "/f/test/test.ts" - The editor will show
Cannot find module '/f/test/test.ts' or its corresponding type declarations.(2307)
Expected behavior
The editor shouldn't report any errors
Screenshots
Browser information
Arc Version 1.47.1 (50893) Chromium Engine Version 126.0.6478.57
Application version
Cloud Version (EE v1.349.0-3-ga82184beb)
Additional Context
In the console, the editor downloads the script successfully:
The bug is only for the editor. The script can be executed successfully.
The bug is only for flow; it doesn't exist in the script.
I create a dedicated windmill cloud workspace for this bug report, you can view and test it directly in bryan-test workspace.
And same for deno
And everything works well when using relative imports:
But not if using relative imports in branch:
Yeah import path typing needs to be fixed, just spent hours trying different workaround but none is working so I'm just going to stick to absolute path for now
We likely cannot make work the absolute imports in the editor but all the other issues should be fixed on latest. Thanks for the report. I strongly recommend using only relative imports, absolute imports are too hacky imho, and should only be used as an escape hatch (and the issues here being solved, that's one less reason to not use them)