Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The requested module './ffmpeg.min.js' does not provide an export named 'FFmpeg' #2

Open
rsclip opened this issue Jul 12, 2022 · 0 comments

Comments

@rsclip
Copy link

rsclip commented Jul 12, 2022

background.js

import "./ffmpeg/ffmpeg-core.js";
import "./ffmpeg/ffmpeg.min.js";
import { FFmpeg } from "./ffmpeg/ffmpeg.min.js"; // error here

manifest.json (relevant parts):

{
    "name": "Example",
    "description": "Example",
    "version": "1.0",
    "manifest_version": 2,
    "background": {
      "service_worker": "background.js",
      "type": "module"
    },
    "permissions": [
        "storage", 
        "activeTab", 
        "scripting",
        "downloads"
    ],
    "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'" 
}

Error:

Uncaught SyntaxError: The requested module './ffmpeg/ffmpeg.min.js' does not provide an export named 'FFmpeg' (at background.js:3:10)

Directory structure:

│   .gitattributes
│   background.js
│   contentScript.js
│   LICENSE
│   manifest.json
│   popup.css
│   popup.html
│
├───ffmpeg
│       ffmpeg-core.js
│       ffmpeg-core.wasm
│       ffmpeg-core.worker.js
│       ffmpeg.min.js
│       ffmpeg.min.js.map

No idea where to go from here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@rsclip and others