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 warning #106

Closed
italodeandra opened this issue Jun 21, 2022 · 3 comments
Closed

Critical dependency warning #106

italodeandra opened this issue Jun 21, 2022 · 3 comments

Comments

@italodeandra
Copy link

I'm getting this warning all the time:

warn  - ../node_modules/@ctrl/qbittorrent/node_modules/keyv/src/index.js
Critical dependency: the request of a dependency is an expression
@scttcper
Copy link
Owner

i think got https://github.com/sindresorhus/got uses it for caching, which we aren't using here.

@scttcper
Copy link
Owner

jaredwray/keyv#45

@italodeandra
Copy link
Author

Thanks for the reference, but since this lib doesn't use keyv, I removed it completely from the Next application instead.

For future reference, this is my next.config.js that also fixes the commonjs issue transpiling:

const withTM = require("next-transpile-modules")([
  "@ctrl/qbittorrent",
  "@ctrl/url-join",
]);

module.exports = withTM({
  webpack: (config, { isServer }) => {
    config.resolve.alias = {
      ...config.resolve.alias,
      keyv: false,
    };
    return config;
  },
});

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

2 participants