codeapp icon indicating copy to clipboard operation
codeapp copied to clipboard

[v1.2.13][Nodejs]ReferenceError: WebAssembly is not defined while running webpack

Open Fi2zz opened this issue 3 years ago • 12 comments

please see the detail below

image

Fi2zz avatar Apr 07 '22 01:04 Fi2zz

WebAssembly is unavailable in iOS's Node.js because of the absence of JIT support. Does your code call WebAssembly anywhere?

bummoblizard avatar Apr 07 '22 05:04 bummoblizard

WebAssembly is unavailable in iOS's Node.js because of the absence of JIT support. Does your code call WebAssembly anywhere?

no,just run webpack command,outcome this error

Fi2zz avatar Apr 07 '22 07:04 Fi2zz

Looks like webpack calls WebAssembly.Module in one of its functions. We need a way to disable that behaviour.

bummoblizard avatar Apr 08 '22 14:04 bummoblizard

Specify this in package.json: webpack-cli: "3.3.12". It's a workaround.

bummoblizard avatar Apr 08 '22 14:04 bummoblizard

i'm working on replacing WebAssembly of webpack

Fi2zz avatar Apr 12 '22 03:04 Fi2zz

Hello, i found a way in webpack's doc webpack output.hashFunction

Fi2zz avatar Apr 15 '22 06:04 Fi2zz

6ED65C60-76C3-4C14-B932-07D216AA55CD Finally worked!

Fi2zz avatar Apr 15 '22 14:04 Fi2zz

Great! Congrats 👏

I will make sure to document this somewhere.

On Fri, 15 Apr 2022 at 22:55, Fitzz @.***> wrote:

[image: 6ED65C60-76C3-4C14-B932-07D216AA55CD] https://user-images.githubusercontent.com/8213998/163585928-0df9a435-b823-44fc-b2e7-b0c8395fc766.png Finally worked!

— Reply to this email directly, view it on GitHub https://github.com/thebaselab/codeapp/issues/408#issuecomment-1100157181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJE6T222GLW2SWGKJ4M335DVFF7NRANCNFSM5SXZZSBA . You are receiving this because you commented.Message ID: @.***>

bummoblizard avatar Apr 15 '22 14:04 bummoblizard

Here’s my two cents. WebAssembly shouldn’t - and isn’t - intended to work on iOS/iPadOS devices, so this is odd that it worked.

luni-moon avatar Jun 04 '22 22:06 luni-moon

Here’s my two cents. WebAssembly shouldn’t - and isn’t - intended to work on iOS/iPadOS devices, so this is odd that it worked.

There is a hash function in webpack that uses webassembly. Turns out there is a way to override it with a custom implementation. The method is shown by the op.

bummoblizard avatar Jun 04 '22 23:06 bummoblizard

Here’s my two cents. WebAssembly shouldn’t - and isn’t - intended to work on iOS/iPadOS devices, so this is odd that it worked.

There is a hash function in webpack that uses webassembly. Turns out there is a way to override it with a custom implementation. The method is shown by the op.

My bad, must’ve missed that. Usually WebAssembly does not work on iOS and iPadOS devices, which is why I said that. Thanks for letting me know!

luni-moon avatar Jun 05 '22 19:06 luni-moon