When I coded the d3-composite-projections, the following stuff worked:
The directory tree:
- composite-projections.js | |- test | |- test.js |- node_modules
Inside test.js, I required d3.js and then, loaded composite-projections.js to test it, the following way:
var d3 = require('../node_modules/d3/d3.js'); var composite_projection = require('../composite-projections.js'); ...
This worked ok, but now I've changed my machine, and running the test gives me the following error:
Message: d3 is not defined Stack: ReferenceError: d3 is not defined at ~/d3-composite-projections/composite-projections.js:6:1
So it's like the required d3 doesn't work when called from composite-projections.js, as if it was never included. Does somebody know why and why it used to work before?