Bravo
Bravo4w ago

Running a script fails when executed in a flow

Script works well when executed by itself but when I try to run it in a flow it fails:
{
"error": {
"name": "ExecutionErr",
"message": "ExitCode: 1, last log lines:\nODE EXECUTION ---\n\n\nwrote cached binary: /tmp/windmill/cache/bun/9e46268582653fcee6abef94b9c2ca052e4f08b82fde866ca9a4e9a337274bf5 (backed by EE distributed object store: false)\n\n\nerror: Cannot find module \"./Hero\" from \"/tmp/windmill/wk-default-7a435c2e53e7-BOW6c/0193269f-eaad-2526-a510-26edd041e261/main.js\"\nnote: missing sourcemaps for /tmp/windmill/wk-default-7a435c2e53e7-BOW6c/0193269f-eaad-2526-a510-26edd041e261/main.js\nnote: consider bundling with '--sourcemap' to get unminified traces\n\nBun v1.1.32 (Linux x64 baseline)",
"step_id": "c"
}
}
Script works well when executed by itself but when I try to run it in a flow it fails:
{
"error": {
"name": "ExecutionErr",
"message": "ExitCode: 1, last log lines:\nODE EXECUTION ---\n\n\nwrote cached binary: /tmp/windmill/cache/bun/9e46268582653fcee6abef94b9c2ca052e4f08b82fde866ca9a4e9a337274bf5 (backed by EE distributed object store: false)\n\n\nerror: Cannot find module \"./Hero\" from \"/tmp/windmill/wk-default-7a435c2e53e7-BOW6c/0193269f-eaad-2526-a510-26edd041e261/main.js\"\nnote: missing sourcemaps for /tmp/windmill/wk-default-7a435c2e53e7-BOW6c/0193269f-eaad-2526-a510-26edd041e261/main.js\nnote: consider bundling with '--sourcemap' to get unminified traces\n\nBun v1.1.32 (Linux x64 baseline)",
"step_id": "c"
}
}
This line in my script seems to cause issues: const Hero = require('@ulixee/hero');
5 Replies
Bravo
BravoOP4w ago
Im using Bun
rubenf
rubenf4w ago
is that an inline script or a workspace script? can the script be ran independently as a deployed script? try adding //nobundling at the top of the script
Bravo
BravoOP4w ago
workspace one can be ran independently, yes
rubenf
rubenf4w ago
can be ran indepndently as a deployed script?
Bravo
BravoOP4w ago
yeah, adding nobundling in various places seems to help out. I need to investigate further, one min that did the trick, I had to do that in a few different scripts though. thank you