yezihaohao / react-admin

:sparkles: react-admin system solution : react 后台管理系统解决方案
https://admiring-dijkstra-34cb29.netlify.com/
MIT License
6.64k stars 1.87k forks source link

导入依赖出错。 #54

Closed MyDinnerIsReady closed 6 years ago

MyDinnerIsReady commented 6 years ago

你好。我把项目down下来以后,运行npm install 安装相关依赖,但是报错: npm WARN deprecated babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump npm ERR! Unexpected end of JSON input while parsing near '..."rc-tooltip":"~2.6.4"'

MyDinnerIsReady commented 6 years ago

应该和源或者npm版本有关,我换了淘宝源以后换了一个报错了。 npm ERR! Unexpected end of JSON input while parsing near '...name":"rc-tabs","vers'

yezihaohao commented 6 years ago

没遇到过这个错误,建议安装最新的稳定版本的npm或者yarn,删除node_modules,重新安装试试。ps:不要用cnpm

MyDinnerIsReady commented 6 years ago

最后清了一下npm缓存,换了默认源解决了,都是淘宝源的锅。 ————————分界线———————— 为淘宝源澄清一下,后来发现居然是我本地的代理客户端搞的鬼,那个神奇的客户端会让我的npm install请求走本地1087代理端口,然后神奇的让流量出现异常,所以会经常报异常json和sha256校验失败!更换客户端以后已经正常!这个锅淘宝源不背。