# ant bugs
$ npm i -S antd
npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall rename
# ant bugs
$ npm i -S antd
npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall rename
https://github.com/github/fetch#json
let users = "";
const url = `https://cdn.xgqfrms.xyz/json/${users="users"}.json`;
fetch('https://cdn.xgqfrms.xyz/json/users.json')
.then(function (response) {
return response.json();
})
.then(function (json) {
console.log('parsed json', json);
})
.catch(function (error) {
console.log('parsing failed', error);
});
暴力解决方案!
package.json
{ "name": "arra", "version": "0.1.0", "private": true, "dependencies": { "antd": "^2.11.2", "moment": "^2.18.1", "prop-types": "^15.5.10", "react": "^15.6.1", "react-dom": "^15.6.1", "react-router-dom": "^4.1.1", "whatwg-fetch": "^2.0.3" }, "devDependencies": { "react-scripts": "1.0.7" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" } }