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

Open
shirazz opened this issue Apr 30, 2020 · 4 comments
Open

Comments

@shirazz
Copy link

shirazz commented Apr 30, 2020

Getting a warning while trying to use the package with NextJS. A reproducible code sample is attached here for reference.

Warning

./node_modules/django-channels/dist/index.js
Critical dependency: the request of a dependency is an expression

Screenshot
image

@shirazz
Copy link
Author

shirazz commented May 2, 2020

The issue is being discussed here in the Parcel Repo.

@fcurella
Copy link
Collaborator

fcurella commented May 4, 2020

Thank you for the report @shirazz !

I've looked ad the Parcel issue you linked, but I did not find any solution. Is there anything I can do?

@shirazz
Copy link
Author

shirazz commented May 4, 2020

Unfortunately i didn't find any fix and I had to use reconnecting web socket instead of this. I was thinking of rebuilding the same using either rollup or WebPack itself. Unfortunately I am at the edge of a critical release. but once i am done, i will look into this as i have plans to use this and i am pretty sure almost all the webpack users will be facing this issue.

@km4
Copy link

km4 commented Jun 26, 2020

my solution at this moment

plugins: [
    ...
    // @issue: https://github.com/channels-frontend/django-channels/issues/7
    // @solution: https://github.com/Giphy/giphy-js/issues/68
    new ContextReplacementPlugin(/\/django-channels\//, (data) => {
      delete data.dependencies[0].critical;
      return data;
    }),
   ...
  ],

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

3 participants