AR
03/22/2022, 7:40 PM3. node_modules/@serverless-stack/node/config/index.js (63, 6) - Top-level await is not available in the configured target environment ("node14")
new sst.EventBus(props.stack, "bus", {
rules: {
plaid_hook: {
eventPattern: { source: ["plaid.hook"] },
targets: ["core/connection/plaid.sync"],
},
},
});
I can invoke the event in the console but am getting this error when invoking:
✘ [ERROR] Top-level await is not available in the configured target environment ("node14")
node_modules/@serverless-stack/node/config/index.js:63:6:
63 │ : await load();
╵ ~~~~~
export async function sync() {
return JSON.stringify({ some: "data" });
}
thdxr
03/22/2022, 11:32 PMthdxr
03/22/2022, 11:32 PMFrank
index.js/ts
, add this to the top of the main
function
app.setDefaultFunctionProps({
bundle: {
format: "esm",
},
});