You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot use fluent-ffmpeg in the production build of my SvelteKit app. It works in dev mode, and also in preview mode, but in the final production build, any call to ffmpeg results in a ReferenceError: __dirname is not defined. I guess it is an issue with ESM vs CommonJS.
Version information
fluent-ffmpeg version: 2.1.3
ffmpeg version: 5.1.5
OS: Alpine Linux (Windows Subsystem for Linux)
Code to reproduce
importffmpegfrom"fluent-ffmpeg";ffmpeg();
(note: if the problem only happens with some inputs, include a link to such an input file)
Expected results
No errors
Observed results
ReferenceError: __dirname is not defined
at new FfmpegCommand (file:///app/build/server/chunks/index-D6fKiITG.js:5210:69)
at FfmpegCommand (file:///app/build/server/chunks/index-D6fKiITG.js:5178:13)
at file:///app/build/server/chunks/0-DGpjmR_G.js:15:8
at file:///app/build/server/chunks/server-DbC9RgP-.js:13:32
at load_server_data (file:///app/build/server/chunks/index-B8KRwtQw.js:1464:42)
at file:///app/build/server/chunks/index-B8KRwtQw.js:2947:24
I tried the same with command line ffmpeg and it works correctly (hint: if the problem also happens this way, this is an ffmpeg problem and you're not reporting it to the right place)
I have included full stderr/stdout output from ffmpeg
The text was updated successfully, but these errors were encountered:
I cannot use
fluent-ffmpeg
in the production build of my SvelteKit app. It works in dev mode, and also in preview mode, but in the final production build, any call toffmpeg
results in aReferenceError: __dirname is not defined
. I guess it is an issue with ESM vs CommonJS.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 errors
Observed results
Checklist
The text was updated successfully, but these errors were encountered: