Describe the bug
I have a project that uses a forked version of ffmpeg.wasm. The project is packaged using npm pack and the resulting .tgz file is used to install ffmpeg. When I use this package in a web worker using ESM import.
import { createFFmpeg } from "@ffmpeg/ffmpeg"; everything is fine in development. However after running npm run build and serving the app using python3 -m http.server 3000 the worker crashes with this error:

Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
"ES Modules may not"
Environment
Environment Info:
current version of create-react-app: 5.0.1
running from C:\Users\nayja\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\create-react-app
System:
OS: Windows 10 10.0.19044
CPU: (4) x64 Intel(R) Core(TM) i3-8130U CPU @ 2.20GHz
Binaries:
Node: 17.8.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 8.5.5 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 100.0.4896.88
Edge: Spartan (44.19041.1266.0), Chromium (100.0.1185.39)
Internet Explorer: 11.0.19041.1566
npmPackages:
react: ^18.0.0 => 18.0.0
react-dom: ^18.0.0 => 18.0.0
react-scripts: 5.0.1 => 5.0.1
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
- Create a react app using
npx create-react-app app --template typescript
- Install ffmpeg.wasm from
- Instantiate ffmpeg inside a web worker using createFFmpeg (imported with ESM syntax)
- Instantiate said web worker with type "module"
- Run
npm run build and serve the resulting index.html
Expected behavior
- FFmpeg.wasm should be instantiated with no errors.
- FFmpeg should log
[info] use ffmpeg.wasm v0.10.2 to the console.
Actual behavior
- The web worker crashes
- This error is logged to the console:

Reproducible demo
A minimal reproducible demo
Describe the bug
I have a project that uses a forked version of ffmpeg.wasm. The project is packaged using

npm packand the resulting .tgz file is used to install ffmpeg. When I use this package in a web worker using ESM import.import { createFFmpeg } from "@ffmpeg/ffmpeg";everything is fine in development. However after runningnpm run buildand serving the app usingpython3 -m http.server 3000the worker crashes with this error:Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
"ES Modules may not"
Environment
Steps to reproduce
npx create-react-app app --template typescriptnpm run buildand serve the resulting index.htmlExpected behavior
[info] use ffmpeg.wasm v0.10.2to the console.Actual behavior
Reproducible demo
A minimal reproducible demo