Closed Matix-Media closed 1 year ago
Turns out this a type definitions issue. (@types/fluent-ffmpeg)
I have the same problem. How did you get rid of it? :) Can you not use @types/fluent-ffmpeg?
I have same problem.
This is my solution:
Replace import Ffmpeg from 'fluent-ffmpeg';
with import Ffmpeg = require('fluent-ffmpeg');
(If you don't need type, just use const Ffmpeg = require('fluent-ffmpeg');
)
Because it's not a ES module, so we need to import like a CommonJs module.
Is there a way in 2023 to use import
and not require
? 🙄
That's such a hacky solution, but it worked
Version information
Code to reproduce
(note: if the problem only happens with some inputs, include a link to such an input file)
Expected results
no error creating the command
Observed results
Error that
FfmpegCommand
is not a constructor.Checklist