antd-admin 调试记录

本文记录了解决升级Node.js及npm后,在Ant Design Admin项目中遇到的npm install错误的过程,包括权限问题和checksum校验失败等,并分享了解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

纯粹问题流水,勿喷!^_^

1.问题:

升级node v8.2.1,npm 5.3.0后antd-adimin下npm install报错

antd-admin git:(master) ✗ npm install
npm WARN checkPermissions Missing write access to /home/quanpower/antd-admin/node_modules/_read-pkg-up@2.0.0@read-pkg-up/node_modules/find-up
npm ERR! path /home/quanpower/antd-admin/node_modules/_read-pkg-up@2.0.0@read-pkg-up/node_modules/find-up
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/home/quanpower/antd-admin/node_modules/_read-pkg-up@2.0.0@read-pkg-up/node_modules/find-up'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/quanpower/.npm/_logs/2017-08-07T09_34_38_562Z-debug.log

Google试了若干办法都没搞定,也看到好多人说npm 5会出这问题,有npm cache verify,npm cache clean -f,有说打开着IDE问题,也去github npm issue里看了下https://github.com/npm/npm/issues/17444,没找到根本答案,浪费了一天时间,最后还是rm -rf node-modules重新来过了。

➜  antd-admin git:(master) ✗ npm install
npm ERR! code EINTEGRITY
npm ERR! sha512-mZJTSg2RcBEXHJnUYNZIttcXNAjupunR57qXfyGoHSsJ0pLKOVsfu8HsBVxizkcNVxuJYlfLLIGJ7rparFNsUA== integrity checksum failed when using sha512: wanted sha512-mZJTSg2RcBEXHJnUYNZIttcXNAjupunR57qXfyGoHSsJ0pLKOVsfu8HsBVxizkcNVxuJYlfLLIGJ7rparFNsUA== but got sha512-1MH6PA4ziRpVADMguYmQfaZHbOSZIvYiL5JvEsRD7Z7UmIgZIJD+2qI6ZBqD2bx4EZDLrocAOT9GclpOUU5ekA==. (5771020 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/quanpower/.npm/_logs/2017-08-07T10_55_25_429Z-debug.log

结果出现checksum问题,后面又把package-lock.json干掉!终于可以继续调试了,问题症结不解。

2.dva

过了一遍大dva+antd crud的例子

https://github.com/sorrycc/blog/issues/18

3.推荐一个调试工具:Redux Devtools + react developertools配合使用,数据流十分清晰

4.利用git submodule将项目加到另外一个smart-iiot里面,另superset也考虑加

参考https://git-scm.com/book/zh/v2/Git-%E5%B7%A5%E5%85%B7-%E5%AD%90%E6%A8%A1%E5%9D%97

http://www.kafeitu.me/git/2012/03/27/git-submodule.html

 

转载于:https://my.oschina.net/quanpower/blog/1479097

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值