-
Notifications
You must be signed in to change notification settings - Fork 56
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
Last publish breaks webpack build. #24
Comments
This error occurs because webpack is trying to consume code intended for Node rather than the browser. In earlier versions of d3 (and d3-request; see d3/d3#3138) the The Alas, unpkg’s use of the If you want to rebundle D3 using webpack, or another bundler such as Rollup, you must configure it to consume the |
Got it thanks! |
Seems like this is still an issue w/browserify, which I guess must be dependent on the We just upgraded to 1.0.6, and found that we were getting the node version of I just hacked the
then rebuilt w/browserify, and it looks like it picks up the browser version instead of the node one. Perhaps there's something wrong in our build, or some option I can use w/browserify to work around this, but ... not obvious to me ATM. My guess is that this will hit more people using d3-request via browserify ... |
I think if you’re using Browserify, you’ll also need Babelify so that you can consume the ES modules rather than trying to re-bundle the generated UMD. |
Anyone figure out how to configure Browserify to use the |
In case anyone is having this problem with webpack version 1, you can add |
It seems to me, based on comments here and create-react-app issue 3166 that the latest D3 may not be compatible with a non-ejected create-react-app. Can anyone confirm this? |
I don’t support webpack, but I am surprised it doesn’t work by default; it’s my understanding that webpack should prefer the module entry point (over the CJS bundle targeted at Node). |
You'll need to explicitly configure webpack |
Facing this issue currently d3/d3-request#24.
4.12 doesn't play nice with Webpack 4 due to d3/d3-request#24, encountered this issue while upgrading Storybook to v4 (which runs on Webpack 4). The suggested fix above was to lock the d3 version to immediately before the breaking dependency upgrade on d3-request. In the long term, we should upgrade griff to use D3 v5 which does not use d3-request at all. Relates to cognitedata/operational-intelligence/issues/1930
4.12 doesn't play nice with Webpack 4 due to d3/d3-request#24, encountered this issue while upgrading Storybook to v4 (which runs on Webpack 4). The suggested fix above was to lock the d3 version to immediately before the breaking dependency upgrade on d3-request. In the long term, we should upgrade griff to use D3 v5 which does not use d3-request at all. Relates to cognitedata/operational-intelligence/issues/1930
It seems that the last publish of this commit d635b89 broke d3 for the browser. I have an angular 1.5 app that uses d3 and since d3 was updated to require 1.0.6 of this package, I get this error when trying to load the app after building:
I have not been able to figure out which dependency update in the commit is causing this yet, but I figured I'd post this first. Reverting to d3 4.10.0 is a temporary workaround, since it requires 1.0.5 of d3-request.
The text was updated successfully, but these errors were encountered: