fluent-ffmpeg / node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)
MIT License
7.85k stars 874 forks source link

Can't initialize "fluent-ffmpeg" instance #1080

Closed avi12 closed 3 years ago

avi12 commented 3 years ago

Version information

Code to reproduce

import ffmpeg from "fluent-ffmpeg";
// or
const ffmpeg = require("fmpeg");

Expected results

Normal initialization.

Observed results

 ERROR  Failed to compile with 1 errors                                                                                                                                                                                     10:10:32 PM

This relative module was not found:

* ./lib-cov/fluent-ffmpeg in ./node_modules/fluent-ffmpeg/index.js
 ERROR  Build failed with errors.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Process finished with exit code 1

The above occurs despite not installing ffmpeg on my machine, and even if I do, the process.env.FLUENTFFMPEG_COV ternary should return false, but since isn't, the require('./lib/fluent-ffmpeg') won't be called and therefore the code will cause the aforementioned error to be thrown.

Checklist

avi12 commented 3 years ago

I'm 99% certain it's not an issue with fluent-ffmpeg, but rather with Yarn, which I discovered that isn't guaranteed to always add all the files of a given module. I filed an issue on Yarn's repository.