东莞大朗网站建设,全网营销公司,儿童早教网站模板,网站制作哪家最好文章目录问题描述【最终解决】我搜索到的解决方案npmjs 该依赖各版本列表及对应的被下载次数github issue 说降级到0.0.3就可以正常运行了SOF 也说降级别到0.0.3问题描述
在项目里用到了 preinstall: npx npm-force-resolutions配置#xff0c;在一台…
文章目录问题描述【最终解决】我搜索到的解决方案npmjs 该依赖各版本列表及对应的被下载次数github issue 说降级到0.0.3就可以正常运行了SOF 也说降级别到0.0.3问题描述
在项目里用到了 preinstall: npx npm-force-resolutions配置在一台机器上执行npm install 成功。 在另一台机器上运行报错 wuyujin1997mac11 react-env % npm i react-env1.0.0 preinstallnpx npm-force-resolutions/usr/local/lib/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.cljs:61(go^
Error: Timeout trying to fetch resolutions from npmat switch__2144__auto__ (/usr/local/lib/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.cljs:61:3)at /usr/local/lib/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.cljs:61:3at npm_force_resolutions$core$find_resolutions_$_state_machine__2145__auto____1 (/usr/local/lib/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.js:476:4)at cljs.core.async.impl.ioc-helpers/FN-IDX (/usr/local/lib/node_modules/npm-force-resolutions/out/npm_force_resolutions/core.js:492:85)at cljs.core.async.impl.ioc-helpers/run-state-machine (/usr/local/lib/node_modules/npm-force-resolutions/out/cljs/core/async/impl/ioc_helpers.cljs:35:23)at cljs.core.async.impl.ioc-helpers/run-state-machine-wrapped (/usr/local/lib/node_modules/npm-force-resolutions/out/cljs/core/async/impl/ioc_helpers.cljs:39:6)at fret (/usr/local/lib/node_modules/npm-force-resolutions/out/cljs/core/async.cljs:490:22)at take-cb (/usr/local/lib/node_modules/npm-force-resolutions/out/cljs/core/async.cljs:188:63)at /usr/local/lib/node_modules/npm-force-resolutions/out/cljs/core/async/impl/channels.cljs:160:45at Immediate.cljs$core$async$impl$dispatch$process_messages (/usr/local/lib/node_modules/npm-force-resolutions/out/cljs/core/async/impl/dispatch.cljs:18:7)
npm ERR! code 1
npm ERR! path /Users/wuyujin1997/Desktop/Coderepo/react-env
npm ERR! command failed
npm ERR! command sh -c npx npm-force-resolutions npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wuyujin1997/.npm/_logs/2023-02-19T04_03_37_645Z-debug-0.log
wuyujin1997mac11 react-env % npm i react-env1.0.0 preinstallnpx npm-force-resolutions0.0.3npm ERR! cb.apply is not a functionnpm ERR! A complete log of this run can be found in:
npm ERR! /Users/wuyujin1997/.npm/_logs/2023-02-19T04_05_21_981Z-debug.log
Install for [ npm-force-resolutions0.0.3 ] failed with code 1
npm ERR! code 1
npm ERR! path /Users/wuyujin1997/Desktop/Coderepo/react-env
npm ERR! command failed
npm ERR! command sh -c npx npm-force-resolutions0.0.3 npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wuyujin1997/.npm/_logs/2023-02-19T04_05_19_597Z-debug-0.log
wuyujin1997mac11 react-env % npm list -g npm-force-resolutions
/usr/local/lib
└── npm-force-resolutions0.0.10以上的日志是一开始 我用默认的0.0.10会报错Error: Timeout trying to fetch resolutions from npm , 而在搜索之后我改用0.0.3可也会报错cb.apply is not a function。
【最终解决】
我的改动是两处
提前在全局安装好要用到的插件版本 sudo npm i -g npm-force-resolutions0.0.10替换镜像源地址 npm config set registry https://mirrors.huaweicloud.com/repository/npm/ npm config get registry
因为之前我用的淘宝提供的镜像源https://registry.npm.taobao.org/换成华为云的就可以了。 所以我觉得这个问题是网络连接速度慢/与服务器连接不稳定导致的。
再次执行成功
我搜索到的解决方案
降版本到0.0.3这个方法在我这里是无效的但其他人也许可以试试。 毕竟每个人的情况都不完全一样。
npmjs 该依赖各版本列表及对应的被下载次数
https://www.npmjs.com/package/npm-force-resolutions?activeTabversions
github issue 说降级到0.0.3就可以正常运行了
Can we configure timeout for force-resolutions or increase it? #33 SOF 也说降级别到0.0.3
https://stackoverflow.com/questions/70768347/timeout-trying-to-fetch-resolutions-from-npx-force-resolutions