Attempted import error: 'behavior' is not exported from 'd3'









up vote
1
down vote

favorite












I am trying to make a sankey diagram using d3 and react.js and I am using this example as a reference https://bl.ocks.org/emeeks/9673c96a682fe3948379. I am fairly new to react(2 days) and I am getting this error--



./src/components/SankeyComponent.js


Attempted import error: 'behavior' is not exported from 'd3' (imported as 'd3').



SankeyComponent.js
This is my code for creating SankeyComponent. As soon as I clear one error other import and export erros are coming up.



import React, Component from 'react';
import ReactFauxDOM from 'react-faux-dom';
import * as d3 from 'd3';
import sankey from 'd3-plugins-sankey';
import _ from 'lodash';
import NODES from '../shared/nodes';
import LINKS from '../shared/links';

class Sankey extends Component

constructor(props)
super(props);

this.state =
nodes: NODES,
links: LINKS
;

render()

// Set units, margin, sizes
var margin = top: 1, right: 1, bottom: 6, left: 1,
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;

var formatNumber = d3.format(",.0f"),
format = function(d) return formatNumber(d) + " TWh"; ,
color = d3.scale.category20();

// Set the sankey diagram properties

var sankey = d3.sankey()
.nodeWidth(15)
.nodePadding(10)
.size([width, height]);

var path = sankey.link();

//var freqCounter = 1;

var graph =
nodes: _.cloneDeep(this.state.nodes),
links: _.cloneDeep(this.state.links)
;

sankey.nodes(graph.nodes)
.links(graph.links)
.layout(32);

// Initialize and append the svg canvas to faux-DOM

var svgNode = ReactFauxDOM.createElement('svg');

var svg = d3.select(svgNode)
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");

// Initialize and append the svg canvas to faux-DOM
var link = svg.append("g").selectAll(".link")
.data(graph.links)
.enter().append("path")
.attr("class", "link")
.attr("d", path)
.style("stroke-width", function(d) return Math.max(1, d.dy); )
.sort(function(a, b) return b.dy - a.dy; );

link.append("title")
.text(function(d) return d.source.name + " → " + d.target.name + "n" + format(d.value); );

// Add nodes

var node = svg.append("g").selectAll(".node")
.data(graph.nodes)
.enter().append("g")
.attr("class", "node")
.attr("transform", function(d) return "translate(" + d.x + "," + d.y + ")"; )
.call(d3.behavior.drag()
.origin(function(d) return d; )
.on("dragstart", function() this.parentNode.appendChild(this); )
.on("drag", dragmove));

node.append("rect")
.attr("height", function(d) return d.dy; )
.attr("width", sankey.nodeWidth())
.style("fill", function(d) return d.color = color(d.name.replace(/ .*/, "")); )
.style("stroke", "none")
.append("title")
.text(function(d) return d.name + "n" + format(d.value); );

node.append("text")
.attr("x", -6)
.attr("y", function(d) return d.dy / 2; )
.attr("dy", ".35em")
.attr("text-anchor", "end")
.attr("transform", null)
.text(function(d) return d.name; )
.filter(function(d) return d.x < width / 2; )
.attr("x", 6 + sankey.nodeWidth())
.attr("text-anchor", "start");

var linkExtent = d3.extent(graph.links, function (d) return d.value);
var frequencyScale = d3.scale.linear().domain(linkExtent).range([0.05,1]);
//var particleSize = d3.scale.linear().domain(linkExtent).range([1,5]);

// the function for moving the nodes
function dragmove(d)
d3.select(this).attr("transform", "translate(" + d.x + "," + (d.y = Math.max(0, Math.min(height - d.dy, d3.event.y))) + ")");
sankey.relayout();
link.attr("d", path);


graph.links.forEach(function (link)
link.freq = frequencyScale(link.value);
link.particleSize = 2.5;
link.particleColor = d3.scale.linear().domain([0,1])
.range([link.source.color, link.target.color]);
)



return (
<svg>
svg.node().toReact()
</svg>
);




export default Sankey;









share|improve this question























  • Did you paste all the contents of SankeyComponent.js here?
    – shkaper
    Nov 11 at 16:24










  • what version of d3 are you using?
    – Sagiv b.g
    Nov 11 at 16:24










  • "d3": "^4.0.0",
    – gkuhu
    Nov 11 at 16:25










  • @shkaper I will paste all the contents. Please have a look I have posted my code
    – gkuhu
    Nov 11 at 16:29











  • @Sagivb.g I am using version 4. Do I have to use version 5
    – gkuhu
    Nov 11 at 16:35














up vote
1
down vote

favorite












I am trying to make a sankey diagram using d3 and react.js and I am using this example as a reference https://bl.ocks.org/emeeks/9673c96a682fe3948379. I am fairly new to react(2 days) and I am getting this error--



./src/components/SankeyComponent.js


Attempted import error: 'behavior' is not exported from 'd3' (imported as 'd3').



SankeyComponent.js
This is my code for creating SankeyComponent. As soon as I clear one error other import and export erros are coming up.



import React, Component from 'react';
import ReactFauxDOM from 'react-faux-dom';
import * as d3 from 'd3';
import sankey from 'd3-plugins-sankey';
import _ from 'lodash';
import NODES from '../shared/nodes';
import LINKS from '../shared/links';

class Sankey extends Component

constructor(props)
super(props);

this.state =
nodes: NODES,
links: LINKS
;

render()

// Set units, margin, sizes
var margin = top: 1, right: 1, bottom: 6, left: 1,
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;

var formatNumber = d3.format(",.0f"),
format = function(d) return formatNumber(d) + " TWh"; ,
color = d3.scale.category20();

// Set the sankey diagram properties

var sankey = d3.sankey()
.nodeWidth(15)
.nodePadding(10)
.size([width, height]);

var path = sankey.link();

//var freqCounter = 1;

var graph =
nodes: _.cloneDeep(this.state.nodes),
links: _.cloneDeep(this.state.links)
;

sankey.nodes(graph.nodes)
.links(graph.links)
.layout(32);

// Initialize and append the svg canvas to faux-DOM

var svgNode = ReactFauxDOM.createElement('svg');

var svg = d3.select(svgNode)
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");

// Initialize and append the svg canvas to faux-DOM
var link = svg.append("g").selectAll(".link")
.data(graph.links)
.enter().append("path")
.attr("class", "link")
.attr("d", path)
.style("stroke-width", function(d) return Math.max(1, d.dy); )
.sort(function(a, b) return b.dy - a.dy; );

link.append("title")
.text(function(d) return d.source.name + " → " + d.target.name + "n" + format(d.value); );

// Add nodes

var node = svg.append("g").selectAll(".node")
.data(graph.nodes)
.enter().append("g")
.attr("class", "node")
.attr("transform", function(d) return "translate(" + d.x + "," + d.y + ")"; )
.call(d3.behavior.drag()
.origin(function(d) return d; )
.on("dragstart", function() this.parentNode.appendChild(this); )
.on("drag", dragmove));

node.append("rect")
.attr("height", function(d) return d.dy; )
.attr("width", sankey.nodeWidth())
.style("fill", function(d) return d.color = color(d.name.replace(/ .*/, "")); )
.style("stroke", "none")
.append("title")
.text(function(d) return d.name + "n" + format(d.value); );

node.append("text")
.attr("x", -6)
.attr("y", function(d) return d.dy / 2; )
.attr("dy", ".35em")
.attr("text-anchor", "end")
.attr("transform", null)
.text(function(d) return d.name; )
.filter(function(d) return d.x < width / 2; )
.attr("x", 6 + sankey.nodeWidth())
.attr("text-anchor", "start");

var linkExtent = d3.extent(graph.links, function (d) return d.value);
var frequencyScale = d3.scale.linear().domain(linkExtent).range([0.05,1]);
//var particleSize = d3.scale.linear().domain(linkExtent).range([1,5]);

// the function for moving the nodes
function dragmove(d)
d3.select(this).attr("transform", "translate(" + d.x + "," + (d.y = Math.max(0, Math.min(height - d.dy, d3.event.y))) + ")");
sankey.relayout();
link.attr("d", path);


graph.links.forEach(function (link)
link.freq = frequencyScale(link.value);
link.particleSize = 2.5;
link.particleColor = d3.scale.linear().domain([0,1])
.range([link.source.color, link.target.color]);
)



return (
<svg>
svg.node().toReact()
</svg>
);




export default Sankey;









share|improve this question























  • Did you paste all the contents of SankeyComponent.js here?
    – shkaper
    Nov 11 at 16:24










  • what version of d3 are you using?
    – Sagiv b.g
    Nov 11 at 16:24










  • "d3": "^4.0.0",
    – gkuhu
    Nov 11 at 16:25










  • @shkaper I will paste all the contents. Please have a look I have posted my code
    – gkuhu
    Nov 11 at 16:29











  • @Sagivb.g I am using version 4. Do I have to use version 5
    – gkuhu
    Nov 11 at 16:35












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am trying to make a sankey diagram using d3 and react.js and I am using this example as a reference https://bl.ocks.org/emeeks/9673c96a682fe3948379. I am fairly new to react(2 days) and I am getting this error--



./src/components/SankeyComponent.js


Attempted import error: 'behavior' is not exported from 'd3' (imported as 'd3').



SankeyComponent.js
This is my code for creating SankeyComponent. As soon as I clear one error other import and export erros are coming up.



import React, Component from 'react';
import ReactFauxDOM from 'react-faux-dom';
import * as d3 from 'd3';
import sankey from 'd3-plugins-sankey';
import _ from 'lodash';
import NODES from '../shared/nodes';
import LINKS from '../shared/links';

class Sankey extends Component

constructor(props)
super(props);

this.state =
nodes: NODES,
links: LINKS
;

render()

// Set units, margin, sizes
var margin = top: 1, right: 1, bottom: 6, left: 1,
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;

var formatNumber = d3.format(",.0f"),
format = function(d) return formatNumber(d) + " TWh"; ,
color = d3.scale.category20();

// Set the sankey diagram properties

var sankey = d3.sankey()
.nodeWidth(15)
.nodePadding(10)
.size([width, height]);

var path = sankey.link();

//var freqCounter = 1;

var graph =
nodes: _.cloneDeep(this.state.nodes),
links: _.cloneDeep(this.state.links)
;

sankey.nodes(graph.nodes)
.links(graph.links)
.layout(32);

// Initialize and append the svg canvas to faux-DOM

var svgNode = ReactFauxDOM.createElement('svg');

var svg = d3.select(svgNode)
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");

// Initialize and append the svg canvas to faux-DOM
var link = svg.append("g").selectAll(".link")
.data(graph.links)
.enter().append("path")
.attr("class", "link")
.attr("d", path)
.style("stroke-width", function(d) return Math.max(1, d.dy); )
.sort(function(a, b) return b.dy - a.dy; );

link.append("title")
.text(function(d) return d.source.name + " → " + d.target.name + "n" + format(d.value); );

// Add nodes

var node = svg.append("g").selectAll(".node")
.data(graph.nodes)
.enter().append("g")
.attr("class", "node")
.attr("transform", function(d) return "translate(" + d.x + "," + d.y + ")"; )
.call(d3.behavior.drag()
.origin(function(d) return d; )
.on("dragstart", function() this.parentNode.appendChild(this); )
.on("drag", dragmove));

node.append("rect")
.attr("height", function(d) return d.dy; )
.attr("width", sankey.nodeWidth())
.style("fill", function(d) return d.color = color(d.name.replace(/ .*/, "")); )
.style("stroke", "none")
.append("title")
.text(function(d) return d.name + "n" + format(d.value); );

node.append("text")
.attr("x", -6)
.attr("y", function(d) return d.dy / 2; )
.attr("dy", ".35em")
.attr("text-anchor", "end")
.attr("transform", null)
.text(function(d) return d.name; )
.filter(function(d) return d.x < width / 2; )
.attr("x", 6 + sankey.nodeWidth())
.attr("text-anchor", "start");

var linkExtent = d3.extent(graph.links, function (d) return d.value);
var frequencyScale = d3.scale.linear().domain(linkExtent).range([0.05,1]);
//var particleSize = d3.scale.linear().domain(linkExtent).range([1,5]);

// the function for moving the nodes
function dragmove(d)
d3.select(this).attr("transform", "translate(" + d.x + "," + (d.y = Math.max(0, Math.min(height - d.dy, d3.event.y))) + ")");
sankey.relayout();
link.attr("d", path);


graph.links.forEach(function (link)
link.freq = frequencyScale(link.value);
link.particleSize = 2.5;
link.particleColor = d3.scale.linear().domain([0,1])
.range([link.source.color, link.target.color]);
)



return (
<svg>
svg.node().toReact()
</svg>
);




export default Sankey;









share|improve this question















I am trying to make a sankey diagram using d3 and react.js and I am using this example as a reference https://bl.ocks.org/emeeks/9673c96a682fe3948379. I am fairly new to react(2 days) and I am getting this error--



./src/components/SankeyComponent.js


Attempted import error: 'behavior' is not exported from 'd3' (imported as 'd3').



SankeyComponent.js
This is my code for creating SankeyComponent. As soon as I clear one error other import and export erros are coming up.



import React, Component from 'react';
import ReactFauxDOM from 'react-faux-dom';
import * as d3 from 'd3';
import sankey from 'd3-plugins-sankey';
import _ from 'lodash';
import NODES from '../shared/nodes';
import LINKS from '../shared/links';

class Sankey extends Component

constructor(props)
super(props);

this.state =
nodes: NODES,
links: LINKS
;

render()

// Set units, margin, sizes
var margin = top: 1, right: 1, bottom: 6, left: 1,
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;

var formatNumber = d3.format(",.0f"),
format = function(d) return formatNumber(d) + " TWh"; ,
color = d3.scale.category20();

// Set the sankey diagram properties

var sankey = d3.sankey()
.nodeWidth(15)
.nodePadding(10)
.size([width, height]);

var path = sankey.link();

//var freqCounter = 1;

var graph =
nodes: _.cloneDeep(this.state.nodes),
links: _.cloneDeep(this.state.links)
;

sankey.nodes(graph.nodes)
.links(graph.links)
.layout(32);

// Initialize and append the svg canvas to faux-DOM

var svgNode = ReactFauxDOM.createElement('svg');

var svg = d3.select(svgNode)
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");

// Initialize and append the svg canvas to faux-DOM
var link = svg.append("g").selectAll(".link")
.data(graph.links)
.enter().append("path")
.attr("class", "link")
.attr("d", path)
.style("stroke-width", function(d) return Math.max(1, d.dy); )
.sort(function(a, b) return b.dy - a.dy; );

link.append("title")
.text(function(d) return d.source.name + " → " + d.target.name + "n" + format(d.value); );

// Add nodes

var node = svg.append("g").selectAll(".node")
.data(graph.nodes)
.enter().append("g")
.attr("class", "node")
.attr("transform", function(d) return "translate(" + d.x + "," + d.y + ")"; )
.call(d3.behavior.drag()
.origin(function(d) return d; )
.on("dragstart", function() this.parentNode.appendChild(this); )
.on("drag", dragmove));

node.append("rect")
.attr("height", function(d) return d.dy; )
.attr("width", sankey.nodeWidth())
.style("fill", function(d) return d.color = color(d.name.replace(/ .*/, "")); )
.style("stroke", "none")
.append("title")
.text(function(d) return d.name + "n" + format(d.value); );

node.append("text")
.attr("x", -6)
.attr("y", function(d) return d.dy / 2; )
.attr("dy", ".35em")
.attr("text-anchor", "end")
.attr("transform", null)
.text(function(d) return d.name; )
.filter(function(d) return d.x < width / 2; )
.attr("x", 6 + sankey.nodeWidth())
.attr("text-anchor", "start");

var linkExtent = d3.extent(graph.links, function (d) return d.value);
var frequencyScale = d3.scale.linear().domain(linkExtent).range([0.05,1]);
//var particleSize = d3.scale.linear().domain(linkExtent).range([1,5]);

// the function for moving the nodes
function dragmove(d)
d3.select(this).attr("transform", "translate(" + d.x + "," + (d.y = Math.max(0, Math.min(height - d.dy, d3.event.y))) + ")");
sankey.relayout();
link.attr("d", path);


graph.links.forEach(function (link)
link.freq = frequencyScale(link.value);
link.particleSize = 2.5;
link.particleColor = d3.scale.linear().domain([0,1])
.range([link.source.color, link.target.color]);
)



return (
<svg>
svg.node().toReact()
</svg>
);




export default Sankey;






javascript reactjs d3.js npm






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 16:48

























asked Nov 11 at 16:20









gkuhu

8210




8210











  • Did you paste all the contents of SankeyComponent.js here?
    – shkaper
    Nov 11 at 16:24










  • what version of d3 are you using?
    – Sagiv b.g
    Nov 11 at 16:24










  • "d3": "^4.0.0",
    – gkuhu
    Nov 11 at 16:25










  • @shkaper I will paste all the contents. Please have a look I have posted my code
    – gkuhu
    Nov 11 at 16:29











  • @Sagivb.g I am using version 4. Do I have to use version 5
    – gkuhu
    Nov 11 at 16:35
















  • Did you paste all the contents of SankeyComponent.js here?
    – shkaper
    Nov 11 at 16:24










  • what version of d3 are you using?
    – Sagiv b.g
    Nov 11 at 16:24










  • "d3": "^4.0.0",
    – gkuhu
    Nov 11 at 16:25










  • @shkaper I will paste all the contents. Please have a look I have posted my code
    – gkuhu
    Nov 11 at 16:29











  • @Sagivb.g I am using version 4. Do I have to use version 5
    – gkuhu
    Nov 11 at 16:35















Did you paste all the contents of SankeyComponent.js here?
– shkaper
Nov 11 at 16:24




Did you paste all the contents of SankeyComponent.js here?
– shkaper
Nov 11 at 16:24












what version of d3 are you using?
– Sagiv b.g
Nov 11 at 16:24




what version of d3 are you using?
– Sagiv b.g
Nov 11 at 16:24












"d3": "^4.0.0",
– gkuhu
Nov 11 at 16:25




"d3": "^4.0.0",
– gkuhu
Nov 11 at 16:25












@shkaper I will paste all the contents. Please have a look I have posted my code
– gkuhu
Nov 11 at 16:29





@shkaper I will paste all the contents. Please have a look I have posted my code
– gkuhu
Nov 11 at 16:29













@Sagivb.g I am using version 4. Do I have to use version 5
– gkuhu
Nov 11 at 16:35




@Sagivb.g I am using version 4. Do I have to use version 5
– gkuhu
Nov 11 at 16:35












1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Looks like d3.behavior.drag was renamed to d3.drag in v4. https://github.com/d3/d3/blob/master/CHANGES.md#dragging-d3-drag



Since you're using d3 v4, you can either update your code or downgrade to v3






share|improve this answer




















  • So i should work with version 4 and change the code to d3.drag
    – gkuhu
    Nov 11 at 17:03










  • ./node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js Module not found: Can't resolve 'aws-sdk' in '...appnode_modulesfseventsnode_modulesnode-pre-gyplib' Now i get this error
    – gkuhu
    Nov 11 at 17:16











  • Is it because I have not installed webpack?
    – gkuhu
    Nov 11 at 17:19










  • I don't know but that seems irrelevant to the question. You could try to ask a new one and add some context, i.e. what is your package.json what build tools you're using, etc.
    – shkaper
    Nov 11 at 17:21










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53250700%2fattempted-import-error-behavior-is-not-exported-from-d3%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










Looks like d3.behavior.drag was renamed to d3.drag in v4. https://github.com/d3/d3/blob/master/CHANGES.md#dragging-d3-drag



Since you're using d3 v4, you can either update your code or downgrade to v3






share|improve this answer




















  • So i should work with version 4 and change the code to d3.drag
    – gkuhu
    Nov 11 at 17:03










  • ./node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js Module not found: Can't resolve 'aws-sdk' in '...appnode_modulesfseventsnode_modulesnode-pre-gyplib' Now i get this error
    – gkuhu
    Nov 11 at 17:16











  • Is it because I have not installed webpack?
    – gkuhu
    Nov 11 at 17:19










  • I don't know but that seems irrelevant to the question. You could try to ask a new one and add some context, i.e. what is your package.json what build tools you're using, etc.
    – shkaper
    Nov 11 at 17:21














up vote
1
down vote



accepted










Looks like d3.behavior.drag was renamed to d3.drag in v4. https://github.com/d3/d3/blob/master/CHANGES.md#dragging-d3-drag



Since you're using d3 v4, you can either update your code or downgrade to v3






share|improve this answer




















  • So i should work with version 4 and change the code to d3.drag
    – gkuhu
    Nov 11 at 17:03










  • ./node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js Module not found: Can't resolve 'aws-sdk' in '...appnode_modulesfseventsnode_modulesnode-pre-gyplib' Now i get this error
    – gkuhu
    Nov 11 at 17:16











  • Is it because I have not installed webpack?
    – gkuhu
    Nov 11 at 17:19










  • I don't know but that seems irrelevant to the question. You could try to ask a new one and add some context, i.e. what is your package.json what build tools you're using, etc.
    – shkaper
    Nov 11 at 17:21












up vote
1
down vote



accepted







up vote
1
down vote



accepted






Looks like d3.behavior.drag was renamed to d3.drag in v4. https://github.com/d3/d3/blob/master/CHANGES.md#dragging-d3-drag



Since you're using d3 v4, you can either update your code or downgrade to v3






share|improve this answer












Looks like d3.behavior.drag was renamed to d3.drag in v4. https://github.com/d3/d3/blob/master/CHANGES.md#dragging-d3-drag



Since you're using d3 v4, you can either update your code or downgrade to v3







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 11 at 16:59









shkaper

892413




892413











  • So i should work with version 4 and change the code to d3.drag
    – gkuhu
    Nov 11 at 17:03










  • ./node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js Module not found: Can't resolve 'aws-sdk' in '...appnode_modulesfseventsnode_modulesnode-pre-gyplib' Now i get this error
    – gkuhu
    Nov 11 at 17:16











  • Is it because I have not installed webpack?
    – gkuhu
    Nov 11 at 17:19










  • I don't know but that seems irrelevant to the question. You could try to ask a new one and add some context, i.e. what is your package.json what build tools you're using, etc.
    – shkaper
    Nov 11 at 17:21
















  • So i should work with version 4 and change the code to d3.drag
    – gkuhu
    Nov 11 at 17:03










  • ./node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js Module not found: Can't resolve 'aws-sdk' in '...appnode_modulesfseventsnode_modulesnode-pre-gyplib' Now i get this error
    – gkuhu
    Nov 11 at 17:16











  • Is it because I have not installed webpack?
    – gkuhu
    Nov 11 at 17:19










  • I don't know but that seems irrelevant to the question. You could try to ask a new one and add some context, i.e. what is your package.json what build tools you're using, etc.
    – shkaper
    Nov 11 at 17:21















So i should work with version 4 and change the code to d3.drag
– gkuhu
Nov 11 at 17:03




So i should work with version 4 and change the code to d3.drag
– gkuhu
Nov 11 at 17:03












./node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js Module not found: Can't resolve 'aws-sdk' in '...appnode_modulesfseventsnode_modulesnode-pre-gyplib' Now i get this error
– gkuhu
Nov 11 at 17:16





./node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js Module not found: Can't resolve 'aws-sdk' in '...appnode_modulesfseventsnode_modulesnode-pre-gyplib' Now i get this error
– gkuhu
Nov 11 at 17:16













Is it because I have not installed webpack?
– gkuhu
Nov 11 at 17:19




Is it because I have not installed webpack?
– gkuhu
Nov 11 at 17:19












I don't know but that seems irrelevant to the question. You could try to ask a new one and add some context, i.e. what is your package.json what build tools you're using, etc.
– shkaper
Nov 11 at 17:21




I don't know but that seems irrelevant to the question. You could try to ask a new one and add some context, i.e. what is your package.json what build tools you're using, etc.
– shkaper
Nov 11 at 17:21

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53250700%2fattempted-import-error-behavior-is-not-exported-from-d3%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

ReactJS Fetched API data displays live - need Data displayed static

政党