# 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
C:\Users\xiagq\AppData\Roaming\npm-cache\_logs
logs
在桌面上新建一个空文件夹,使用 package.json 进行重新安装
$ npm i
,
将 node_modules 所有安装的依赖包复制到项目目录下,覆盖掉原来的 node_modules!
{
"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"
}
}
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);
});
https://www.npmjs.com/package/ng2-seed
https://docs.npmjs.com/cli/cache