CompileError using webpack: Missing mediainfo.wasm
See original GitHub issueHey there!
It seems like there is a bug. Here is what I’m getting when playing around with the library using create react app template:
Uncaught (in promise) RuntimeError: abort(CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0). Build with -s ASSERTIONS=1 for more info.
at abort (http://localhost:3000/static/js/1.chunk.js:3145:17)
at http://localhost:3000/static/js/1.chunk.js:3239:15
That’s how the lib is being imported:
import MediaInfo from 'mediainfo.js'
Any suggestions? Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
I want to use mediainfo.js in React.js without 'eject' command
I solved it using "WebWorker". // config-override.js const path = require("path"); const { resolve } = require('path'); const CopyPlugin ...
Read more >node-mediainfo - npm Package Health Analysis - Snyk
The npm package node-mediainfo was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as...
Read more >Testing - Release Notes - Liferay Issues
Documentation. [LPS-124867] - The Localizable field is missing in new Data Engine Editor ... [LPS-69125] - Documents and Media Info Panel use correct...
Read more >mozilla-release: pushlog - Mercurial
IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release ... is added to test indexes and cursors with wasm; r=asuth a=jcristau.
Read more >ChangeLog.openSUSE-Leap-15.4-x86_64-aarch64-ppc64le ...
+ csync -- Add fix-missing-const.patch: Fix a compile error on Leap 15.1 ... mc.ext: support fb2 e-books (#4167) + - ext.d: use mediainfo...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The WASM loader tries to load
mediainfo.wasm
. It determines the URL relative tomediainfo.js
. When using a CDN this just works becausemediainfo.wasm
is published in thedist
folder.When you’re using a custom bundler build flow you need to make sure to copy
mediainfo.wasm
to your output directory. Check the source code of https://mediainfo.js.org/ on how this is achieved using webpack andcopy-webpack-plugin
.Docs on using a JS bundler could be improved, I guess.
I made it work loading from the CDN! thanks