【发布时间】:2017-09-28 20:47:52
【问题描述】:
所以我在 7 月份推出了一个 d3 项目,它正在运行。我今天把它拉下来更新,在运行npm install 后,我收到来自d3.csv() 的错误
以下...
d3.csv('js/data/data1.csv', (returnedData) => {
console.log('RETURNEDDATA', returnedData);
});
在 Chrome 的控制台中,它会追踪一个包含 10 个对象的数组,这些对象具有正确的列标题,但值都是 NaN,另外还有一个额外的属性读取...
1: TypeError: Failed to execute 'fetch' on 'Window': Failed to parse URL from //localhost:80js/data/data1.csv
在 Safari 中,我得到了类似的东西,但它显示为...
0 {[native code]: "initializeFetchRequest@[native code]", 3P%: NaN, AST: NaN, BPM: NaN, FG%: NaN, …}
1 {[native code]: "[native code]"}
2 {[native code]: "fetch@[native code]"}
3 {[native code]: "_onFinish@http://localhost:3000/js/scripts-bundle.js:18:27206"}
4 {[native code]: "http://localhost:3000/js/scripts-bundle.js:18:26091"}
5 {[native code]: "emit@http://localhost:3000/js/scripts-bundle.js:12:30954"}
6 {[native code]: "finishMaybe@http://localhost:3000/js/scripts-bundle.js:18:13349"}
7 {[native code]: "endWritable@http://localhost:3000/js/scripts-bundle.js:18:13432"}
8 {[native code]: "end@http://localhost:3000/js/scripts-bundle.js:18:16918"}
9 {[native code]: "end@http://localhost:3000/js/scripts-bundle.js:18:29326"}
10 {[native code]: "send@http://localhost:3000/js/scripts-bundle.js:19:13018"}
11 {[native code]: "send@http://localhost:3000/js/scripts-bundle.js:8:4724"}
12 {[native code]: "http://localhost:3000/js/scripts-bundle.js:21:3849"}
13 {[native code]: "mightThrow@http://localhost:3000/js/scripts-bundle.js:15:6588"}
14 {[native code]: "http://localhost:3000/js/scripts-bundle.js:15:7221"}
知道是什么原因造成的吗?我已经从 4.9 更新了。?到 4.10.2 没有成功。
【问题讨论】:
标签: javascript csv d3.js