Reputation: 93
I'm running a server via npm start
on 10.0.1.18:3000
.
I'm doing:
import * as request from 'd3-request';
const myPath = './data/my_file.json';
request.json(myPath, (error,data)=>console.log(error,data));
This is failing, with an error:
"Failed to execute 'fetch' on 'Window': Failed to parse URL from //localhost:80./data/my_file.json
"
It seems like there are two problems:
localhost:80
instead of 10.0.1.18:3000
Upvotes: 1
Views: 86