question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When using with webpack, crossfilter is undefined

See original GitHub issue

Using the latest 2-beta.32

When using with webpack the following check is true

if(typeof define === "function" && define.amd) {
  define(["d3", "crossfilter"], _dc);
}

But since you are using crossfilter2 this is undefined.

Changing this line to define(["d3", "crossfilter2"], _dc); fixes things.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
nordfjordcommented, Oct 17, 2016

In my config it’s a simple:

{
  resolve: {
    alias: {
     'crossfilter': 'crossfilter2'
    }
  }
}
1reaction
Anima-t3dcommented, Oct 28, 2016

For anyone else using webpack and doesn’t get the resolve fix working… just make sure that it’s the only resolve in the config. My config is quite long and I forgot I declared a resolve at the bottom… ended up overwriting my resolve fix from @nordfjord . Once I consolidated it, it worked like a charm! Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReferenceError- crossfilter is not defined - Stack Overflow
I just made the change you suggested @Jecoms and now I am getting - TypeError - d3.time is undefined on dc.js line -...
Read more >
Module Methods - webpack
This section covers all methods available in code compiled with webpack. When using webpack to bundle your application, you can pick from a...
Read more >
CopyWebpackPlugin | webpack
Default: undefined. Glob or path from where we copy files. Globs accept fast-glob pattern-syntax. Glob can only be a string . Warning. Don't...
Read more >
css-loader | webpack - JS.ORG
Allows to enable/disable CSS Modules or ICSS and setup configuration: undefined - enable CSS modules for all files matching /\.module\.\w+$/i.test(filename) and ...
Read more >
less-loader | webpack - JS.ORG
Use an object to pass options through to Less. ... Allows setting the options passed through to Less based off of the loader...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found