WindmillWWindmill
Powered by
BravoB
Windmill•17mo ago•
9 replies
Bravo

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');
const Hero = require('@ulixee/hero');
WindmillJoin
3,388Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

We're live here https://discord.com/channels/930051556043276338/1278977038430240813

henri-c · 6d ago

rubenf

Infrastructure as code

rubenf · 4w ago

rubenf

As we're preparing for a new Windmill sandbox SDK, we took the opportunity **to open-source NSJAIL sandboxing** and make it available in CE and easier to set. In 1.634.0, just set nsjail to benefit from the tightest security and isolation per job. It's constraining so no need to use it unless you need but now you won't be restricted in security for CE if you need to.

rubenf · 4w ago

Similar Threads

Accessing logs of flows executed from a script
ShenanigansSShenanigans / help
10mo ago
Bug: Operator automated logout when opening a script/flow
NeitNNeit / help
4mo ago
Single script with long running loop vs flow loop feature
benBben / help
2mo ago
Execute a script for each flow run
DaanDDaan / help
16mo ago