位置: IT常识 - 正文

解决npm ERR! Cannot read properties of null (reading ‘pickAlgorithm‘)(解决口苦最快的方法)

编辑:rootadmin
解决npm ERR! Cannot read properties of null (reading ‘pickAlgorithm‘) 文章目录1. 复现问题2. 分析问题3. 解决问题

推荐整理分享解决npm ERR! Cannot read properties of null (reading ‘pickAlgorithm‘)(解决口苦最快的方法),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:解决的英文,解决肚子胀气最快方法,解决的英文,解决打呼噜只需一杯水,解决掉发的有效方法,解决烧心最快方法,解决烧心最快方法,解决口苦最快的方法,内容如对您有帮助,希望把文章链接给更多的朋友!

1. 复现问题

今天准备克隆Redis桌面(GUI)管理客户端,故按照官方文档给出的指令运行时,如下图所示:

但在执行指令npm install --platform=win32却报出如下图错误:

PS D:\Software\RedisDesktopManager\AnotherRedisDesktopManager> npm install --platform=win32npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependenciesnpm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependenciesnpm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibilitynpm WARN deprecated electron-osx-sign@0.5.0: Please use @electron/osx-sign moving forward. Be aware the API is slightly differentnpm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.npm WARN deprecated svgo@0.7.2: This SVGO version is no longer supported. Upgrade to v2.x.x.npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.npm ERR! Cannot read properties of null (reading 'pickAlgorithm')npm ERR! A complete log of this run can be found in:npm ERR! C:\Users\zxy\AppData\Local\npm-cache\_logs\2022-11-04T07_24_57_963Z-debug-0.log

注意看上述错误的倒数第3行,即Cannot read properties of null (reading 'pickAlgorithm')

2. 分析问题

Cannot read properties of null (reading 'pickAlgorithm')翻译成中文就是无法读取 null 的属性(读取 'pickAlgorithm')

但是,我在运行指令npm install --platform=win32时,并没有涉及pickAlgorithm字段呀,于是,通过查找资料可得如下解决方案:

方案1解决npm ERR! Cannot read properties of null (reading ‘pickAlgorithm‘)(解决口苦最快的方法)

重新安装node解决,这并没有解决我的问题,舍弃。

方案2

删了node models重新下。

或者直接下载CNPM(淘宝镜像)进行安装CNPM安装办法:

npm install -g cnpm -registry=https://registry.npm.taobao.org

查看cnpm是否真安装成功:

cnpm -v

这种方式也没有解决我的问题。

于是,使用如下第3种方案解决了我的问题。

3. 解决问题在终端输入指令npm cache clear --force,如下所示:PS D:\Software\RedisDesktopManager\AnotherRedisDesktopManager> npm cache clear --forcenpm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.npm WARN using --force Recommended protections disabled.再次执行指令npm install --platform=win32,即可完成安装,如下所示:PS D:\Software\RedisDesktopManager\AnotherRedisDesktopManager> npm install --platform=win32npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.npm WARN deprecated electron-osx-sign@0.5.0: Please use @electron/osx-sign moving forward. Be aware the API is slightly differentnpm WARN deprecated svgo@0.7.2: This SVGO version is no longer supported. Upgrade to v2.x.x.npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependenciesnpm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.added 706 packages, and changed 55 packages in 2m93 packages are looking for funding run `npm fund` for details输入npm start启动程序,如下图所示:

此时,报出另外一个错误,即 Cannot find module 'D:\Software\RedisDesktopManager\AnotherRedisDesktopManager\node_modules\fs.realpath\index.js'. Please verify that the package.json has a valid "main" entry。

即在当前目录下找不到index.js文件,于是,我们去当前目录下区创建该文件即可:

创建index.js文件后,再次执行npm start指令,即可启动程序了,如下所示:

本文链接地址:https://www.jiuchutong.com/zhishi/269199.html 转载请保留说明!

上一篇:WPS广告怎么关闭 ?教你轻松去掉WPS广告方法(wps的广告怎么关掉)

下一篇:苹果14promax电池多少毫安(苹果14promax电池掉电很快)

  • 全国增值税专用发票计算机稽核网络系统工程
  • 小规模拍卖公司差额征税
  • 一般纳税人附加税优惠政策2023
  • 汽车租赁企业
  • 购买性支出和转移性支出财政职能发挥方面有何不同
  • 小规模纳税人如何转一般纳税人
  • 年终奖12月份计提少了
  • 借应交税费销项税额贷未交增值税
  • 同一控制下企业合并取得的长期股权投资
  • 亏损企业捐赠支出怎么算
  • 个人住房转让纳税标准
  • 劳务派遣用工的岗位只能在哪些工作岗位上实施
  • 预付款期末有结余年末如何做账务处理?
  • 收到供应商发票的会计处理怎么做?
  • 电子发票详见清单怎么开
  • 个人劳务费怎么开票
  • 安保服务费税率几个点怎么算
  • 关于增值税报税的通知
  • 购进固定资产抵扣时咋填报增值税
  • 财务付款制度及流程图
  • 银行摘要冲账是什么意思
  • 所得税新规定
  • 工会经费漏申报去大厅怎么处理
  • 企业的不征税收入用于支出所形成的资产
  • 金融服务收入如何做账
  • 股东以个人名义签订租赁合同
  • 事业基金弥补收支差额
  • 非居民企业租赁增值税
  • 个人承包集体企业违法吗
  • 印花税资金账簿税率
  • 开电脑店几年搞活动好吗
  • 股东退股资金如何返还
  • php 用户和密码
  • 虚拟机vm怎么用
  • php配置文件的名字是
  • 股份支付费用是股权激励成本吗?
  • 其他业务收入与营业外收入
  • unity loom插件
  • lpstat命令
  • 股票收益缴纳个人所得税吗
  • 劳务公司账务处理流程简易计税
  • 提供加工劳务属于增值税征收范围吗
  • 公司租房电费怎么算
  • ca证书收费金额是多少?
  • 公司车辆固定资产转移税
  • 织梦安装完要删除哪个文件
  • 可供分配利润的会计分录
  • mongodb replica set 添加删除节点的2种方法
  • 记 vue-cli-plugin-dll 使用,优化vue-cli项目构建打包速度
  • 单位上社保需要个人提供什么资料
  • 销售车位怎么找客户
  • 资产负债表和利润表的认定
  • 预付房租计入长期待摊费用吗
  • 没有发票的费用怎么报销
  • 不得从销项税额中抵扣的进项税额,不得计提加计抵减额
  • 进口货物发生纳税义务时间为
  • 固定资产报废后怎么处理
  • 第三方支付利息
  • 报销差旅费用什么收款凭证还是转账凭证
  • 资本公积可以随便增加吗
  • 自产的产品作为福利增值税
  • 购买咨询服务费计入什么科目
  • 帮员工代缴社保分录怎么办
  • 定期存款怎么做
  • 认缴制下实收资本印花税
  • 税审报告一定要税所主任签吗
  • sql查询从入门到实践
  • 目前用到的两个字符
  • linux.iso在哪里
  • windows 注册表命令
  • win8尝试修复
  • 简单说明ssh远程登录流程
  • shell数值比较
  • javascript常见的数据类型
  • 用js设置颜色
  • eclipse折叠代码块if else工具
  • python 遍历数组
  • 关于工龄认定的司法解释
  • 提高税务干部七种能力的意义
  • 广西南宁税务12366
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设