Closed harpal-hp closed 4 years ago
Issue is with only server-less framework node JS lambda project, working fine with plain node JS project
Can you create a minimal repro repo so that I can clone and check the error? Also, what command to use to reproduce it.
It seems to be problem with serverless
framework where it tries to parse wasm file. The way I can see is either config serverless
to not to do that. Or I can fix it at camaro project where I remove wasm file and place its content directly in js file.
Just my hypothesis.
@harpal-hp this looks similar with this issue. update the webpack config to ignore wasm.
https://github.com/serverless-heaven/serverless-webpack/issues/386
Ok, i will try to do that. i have created the repo if you want to replicate the issue -
https://github.com/harpal-sgh/serverless-camaro
Run : npm i then sls offline, you might have to install serverless if not installed already
I tried ignoring .wasm file, but i am losing serverless-bundle capabilities. i have to bundle it using web-pack. If you can do something in Camaro project, it will be great help for everyone, who want to use Camaro library with server-less framework.
Thanks
I tried ignoring .wasm file, but i am losing serverless-bundle capabilities. i have to bundle it using web-pack. If you can do something in Camaro project, it will be great help for everyone, who want to use Camaro library with server-less framework.
Thanks
it's possible. lemme take a look into it.
@tuananh do you know how long it will take to fix this?
@harpal-hp i'm working on it. thought it would be straight forward but somehow, it still doesn't work yet :D. maybe another week or two, depends on how i can manage my time.
Recently, I chose to use worker_threads
for performance gain so web support is dropped.
i'm looking for way to re-add it in the future but I don't know how yet. So this won't be fixed anytime soon.
For googlers:
Just a not that worker_threads
means this won't work on platforms that don't support Node 12. For example Google Cloud Functions.
(Check node -v
locally if you're having working errors)
Describe the bug using serverless framework and trying to transform the xml using template. getting error Module not found for asm2wasm, env, global, along with below error - WebAssembly module is included in initial chunk. This is not allowed, because WebAssembly download and compilation must happen asynchronous. Add an async splitpoint (i. e. import()) somewhere between your entrypoint and the WebAssembly module:
Minimal Script To Reproduce running sls offline in serverless project