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

can't load 'crossfilter' #1293

Closed
ghost opened this issue Apr 5, 2017 · 2 comments
Closed

can't load 'crossfilter' #1293

ghost opened this issue Apr 5, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 5, 2017

I installed dc@2.0.2 using 'npm install dc'
then

import dc from 'dc'

there is an error: can not load 'crossfilter'

i change the following code in dc.js(line:10707)
define(["d3", "crossfilter"], _dc);
to
define(["d3", "crossfilter2"], _dc);
and error is gone
so is this a bug?

@gordonwoodhull
Copy link
Contributor

I presume you're using Webpack. Duplicate of #1214.

It's sort of a bug in the way the community fork of crossfilter is distributed - the package would have to be renamed to match the filename (or vice versa). Currently dc.js is configured to work with AMD, which has a different convention for how modules and filenames should be specified.

See the linked tickets for more details and workarounds.

gordonwoodhull added a commit that referenced this issue May 24, 2017
this breaks requireJS but fixes webpack - since the community fork of
crossfilter has a different package name from its filename, one or the
other packaging system is going to be unhappy.

requireJS users will need to rename crossfilter.js to crossfilter2.js
when copying it into position, or use the requireJS paths or map
configuration options to specify that the filename is different from the
module name.

http://requirejs.org/docs/api.html#config-paths
http://requirejs.org/docs/api.html#config-map

fixes #1213
fixes #1214
fixes #1261
fixes #1293
fixes #1302
breaks #1304!
@gordonwoodhull
Copy link
Contributor

As of dc.js 2.0.3 / 2.1.6, we'll break requireJS compatibility in favor of webpack compatibility.

See #1304 if this creates problems for you.

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

1 participant