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

Critical dependency: the request of a dependency is an expression #38

Closed
michaelbirchler opened this issue Nov 26, 2020 · 6 comments
Closed
Labels
🙋 no/question This does not need any changes

Comments

@michaelbirchler
Copy link

Subject of the issue

We use remark-textr in a next.js / webpack web application and get the following warning:

node_modules/remark-textr/index.js 24:34-45
Critical dependency: the request of a dependency is an expression

Your environment

  • OS macOS
  • Packages: remark-textr, 4.0.0, next.js 10.0.2
  • Env: node, 12.19.1

Steps to reproduce

Install remark-textr in a webpack application.

Similar issues

Related links

@michaelbirchler michaelbirchler added 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Nov 26, 2020
@wooorm
Copy link
Member

wooorm commented Nov 26, 2020

The steps to reproduce are missing a small reproducible code sample, e.g., a codesandbox would be useful

@wooorm
Copy link
Member

wooorm commented Nov 26, 2020

E.g., ik wondering what webpack version the problem is. And if you can solve it by requiring your textr plugins yourself instead of passing in strings. Or if you can solve it by configuring webpack.

michaelbirchler added a commit to swissredcross/remark-textr-webpack-error that referenced this issue Nov 27, 2020
@michaelbirchler
Copy link
Author

@wooorm I've created a minimal example repository. You can clone it here and start it with yarn dev. 🙇‍♂️.

@wooorm
Copy link
Member

wooorm commented Nov 27, 2020

This seems to be a warning, not an error. Searching turns up a lot of discussions, such as: webpack/webpack#196.

I am able to add:

import ellipses from "typographic-ellipses";
// ...

    <ReactMarkdown
      {...{
        source,
        plugins: [[textr, { plugins: [ellipses] }]],
      }}
    />

And it works just fine.

So it seems you can ignore the warning?

@wooorm
Copy link
Member

wooorm commented Nov 27, 2020

It seems a bit dirty, but you could maybe filter the warnings out if you know it’s acceptable: webpack/webpack#196 (comment)

@michaelbirchler
Copy link
Author

@wooorm I've removed the warning with swissredcross/remark-textr-webpack-error@6c3d4c0. Thank you for helping me with the issue.

@wooorm wooorm added 🙋 no/question This does not need any changes and removed 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes
Development

No branches or pull requests

2 participants