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 request of a dependency is an expression [webpack] #862

Open
2 tasks
moshfeu opened this issue Nov 13, 2018 · 3 comments
Open
2 tasks

The request of a dependency is an expression [webpack] #862

moshfeu opened this issue Nov 13, 2018 · 3 comments

Comments

@moshfeu
Copy link

moshfeu commented Nov 13, 2018

Disclaimer: Maybe it's non issue.

I'm using this library (part of youtube-mp3-downloader) with webpack@4.21.0 and I get the warning below.

As much as I understand, webpack doesn't "like" dynamically require. You can get more info here.

Version information

  • fluent-ffmpeg version: 2.1.2
  • ffmpeg version: irelevant
  • OS: macos

Expected results

This library will not cause webpack to warn

Observed results

Webpack does warn about:

/node_modules/fluent-ffmpeg/lib/options/misc.js 27:21-40
Critical dependency: the request of a dependency isan expression

Checklist

  • 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) - Irelevant
  • I have included full stderr/stdout output from ffmpeg - Irelevant

Thanks!

@njoyard
Copy link
Member

njoyard commented Feb 8, 2019

Yes, this is known and is a side effect of the way our coverage testing is implemented.

If anyone comes up with a better solution, I'd be glad to merge it 😉

umens added a commit to umens/node-fluent-ffmpeg that referenced this issue Oct 29, 2020
Fix the following Webpack Error:
WARNING in ./node_modules/fluent-ffmpeg/lib/options/misc.js 27:21-40
Critical dependency: the request of a dependency is an expression
@umens
Copy link

umens commented Oct 29, 2020

hey @moshfeu i found a way to fix it. check the MR #1077 while waiting for it to be merged and (maybe 😃 ) release

@jackple
Copy link

jackple commented Dec 9, 2020

temporary solution with webpack externals:

 const IGNORES = ['fluent-ffmpeg']
 return function (context, request, callback) {
        if (IGNORES.includes(request)) {
            return callback(null, `require('${request}')`)
        }
       return callback()
 }

trongnhan136 pushed a commit to trongnhan136/node-fluent-ffmpeg that referenced this issue Jul 29, 2021
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

4 participants