Skip to main content

code piece appears to be broken

Even when using a simple output that should work regardless of steps before and after, I still get e.code is not a function as the output. very limiting.

2 comments

Log in to comment and vote

Comments2

  • Libby Y.

    •

    Mar 19, 2025

    cloud, I tried a new flow to test, used a put storage piece to set a “testKey” to 30. So in my code piece I have “amount” as the key, with the put piece as the value.

    input:

    { "amount": "30" }

    Code:

    const code = async ({ inputs }) => { return { amount: inputs.amount }; };

    export default code;

    Output:

    ""e.code is not a function""

    Logs:

    "TypeError: e.code is not a function\n at Object.<anonymous> (webpack://activepieces/engine/src/lib/core/code/no-op-code-sandbox.ts:8:27)\n at Generator.next (<anonymous>)\n at <anonymous> (webpack://activepieces/node_modules/tslib/tslib.es6.mjs:121:69)\n at new Promise (<anonymous>)\n at Module.m (webpack://activepieces/node_modules/tslib/tslib.es6.mjs:117:10)\n at Object.runCodeModule (/root/main.js:1:350013)\n at <anonymous> (webpack://activepieces/engine/src/lib/handler/code-executor.ts:41:42)\n at Generator.next (<anonymous>)\n at a (webpack://activepieces/node_modules/tslib/tslib.es6.mjs:118:56)\n"

  • Mohammad Abu Aboud

    Team•

    Mar 19, 2025

    Can you post the the full code snippet?

    are you self hosting or on the cloud? (If self hosting, can you please post which version)