ffmpeg.wasm
ffmpeg.wasm copied to clipboard
Cannot find module '@ffmpeg/core'
Describe the bug
INFO Launching Electron... [info] use ffmpeg.wasm v0.9.8 [info] load ffmpeg-core [info] loading ffmpeg-core [info] fetch ffmpeg.wasm-core script from @ffmpeg/core (node:14408) UnhandledPromiseRejectionWarning: Error: Cannot find module '@ffmpeg/core'
Desktop (please complete the following information):
- OS: [win10]
- Browser [Electron]
- Version [11.4.7]
@letsfire It's the same problem. Do you use webpack?
@r-asada-ab vue-cli-service,it based on webpack ? i lack knowledge about JS. I do not know why,@ffmpeg/core is exist,but cannot find
I faced a similar issue. After referrring the docs, I found that providing corePath
field in the createFFmpeg
function solved the issue for me.
const ffmpeg = createFFmpeg({
corePath: 'https://unpkg.com/@ffmpeg/[email protected]/dist/ffmpeg-core.js',
log: true,
});
Same problem here, running Vue JS on top of electron and trying to load ffmpeg in background. I've tried to change corePath to relative and absolute paths of the ffmpeg-core.js, but the message is always the same:
UnhandledPromiseRejectionWarning: Error: Cannot find module '/path/to/ffmpeg-core.js'
It works perfectly in Vue JS client-side, Electron JS without Vue JS and Node JS.
Did someone else get through that?
Same problem here.
Tried all versions of @ffmpeg/ffmpeg and @ffmpeg/core. Tried it with and without the corePath
parameter. Tried with importing from the unpkg URL, tried downloading the assets and using them as static files. In all cases I end up with an error like: Cannot find module '@ffmpeg/core'
or Cannot find module '@ffmpeg/core/dist/ffmpeg-core.js'
I suspect the package to be not working for most people because of this.
Details:
- Using Vite 3.1.0
- Using the package on the server-side
- The package works in development mode but not in production mode
I have the same situation as @clonecorp. Whenever I use corePath in the ffmpeg options it can never find the module, even if I've verified the file exists. Using a simple index.js file to instantiate the ffmpeg object, Node v19.1.0.
Same. I installed
"@ffmpeg/ffmpeg": "^0.11.6",
"@ffmpeg/core": "^0.11.0"
Using createFFmpeg()
without corePath
results in:
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11413:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
cause: Error: unknown scheme
But if I try to provide a corePath i.e
corePath: "https://unpkg.com/@ffmpeg/[email protected]/dist/ffmpeg-core.js",
I get
Error: Cannot find module 'https://unpkg.com/@ffmpeg/[email protected]/dist/ffmpeg-core.js'
Require stack:
- D:\Github\vttc\node_modules\@ffmpeg\ffmpeg\src\node\getCreateFFmpegCore.js
- D:\Github\vttc\node_modules\@ffmpeg\ffmpeg\src\node\index.js
- D:\Github\vttc\node_modules\@ffmpeg\ffmpeg\src\createFFmpeg.js
- D:\Github\vttc\node_modules\@ffmpeg\ffmpeg\src\index.js
Having the same issue on a next.js
project
Having the same issue on a next.js
project
Manually installing @ffmpeg/core
fixed it for me
npm -i @ffmpeg/core
Same. I tried both with and without core since I wasn't sure why it was needed to be installed if it's not imported like a normal dependency. But it is indeed described to be installed in the README
$ npm install @ffmpeg/ffmpeg @ffmpeg/core
I was able to solve this issue on my express server by downgrading from Node 19 to Node 16. I am using these versions of npm ffmpeg libraries, and not using an external corePath
option like some of the other suggestions:
"@ffmpeg/core": "^0.10.0",
"@ffmpeg/ffmpeg": "^0.10.0",