Jason
02/16/2022, 2:13 PMenvironment: {NODE_OPTIONS: '--experimental-wasm-threads'}
but after adding it the function is just never invoked. it's an api and I am invoking it manually via the sst console. Where am I going wrong? Is this the correct way to enable it?
Edit: ah it is trying to invoke, I now see an error /var/lang/bin/node: --experimental-wasm-threads is not allowed in NODE_OPTIONS
. Is there any way to allow this?thdxr
02/16/2022, 6:08 PMthdxr
02/16/2022, 6:08 PMJason
02/16/2022, 6:26 PMJason
02/16/2022, 6:27 PMnode --experimental-wasm-threads
I see no error, so not sure why the lambda blocks itJason
02/16/2022, 6:55 PMconst api = new sst.Api(this, 'Api', {
routes: {
'GET /test': {
handler: 'src/services/queues/consumer.handler',
layers: [this.ffmpegLayer()],
environment: {
NODE_OPTIONS: '--experimental-wasm-threads',
},
runtime: 'nodejs14.x',
},
},
});
node only complains when I add the environment variable. when i remove it the library complains because it expects wasm thread supportFrank
sst start
) or after u deployed?Jason
02/16/2022, 10:51 PMthdxr
02/16/2022, 11:04 PMenableLiveDev: false
below handler
thdxr
02/16/2022, 11:04 PMJason
02/16/2022, 11:20 PM23:18:51.508
[INFO]
/var/lang/bin/node: --experimental-wasm-threads is not allowed in NODE_OPTIONS
23:18:51.508
[ERROR]
Error: Runtime exited with error: exit status 9 Runtime.ExitError
thdxr
02/16/2022, 11:20 PMJason
02/16/2022, 11:21 PMFrank
Frank
NODE_OPTIONS=--experimental-wasm-threads node -v
Jason
02/17/2022, 9:35 AMnode: --experimental-wasm-threads is not allowed in NODE_OPTIONS
. but when I run node --experimental-wasm-threads
it works fine and actually enables the featureJason
02/17/2022, 9:36 AMnode --experimental-wasm-threads
Welcome to Node.js v14.18.2.
Type ".help" for more information.
> const check = require("wasm-check")
undefined
> check.feature.threads
true
Jason
02/17/2022, 9:36 AMnode
Welcome to Node.js v14.18.2.
Type ".help" for more information.
> const check = require("wasm-check")
undefined
> check.feature.threads
false
>
Frank
--experimental-wasm-threads
to Lambda function?Jason
02/17/2022, 10:00 PMJason
02/17/2022, 10:00 PMFrank
NODE_OPTIONS
was the only option