
effect-solutions 这个包,现在最新的是 0.5.2 ,npmmirror 上面还是 0.4.13
一个镜像站出这种错误实在是太恶心了,换腾讯的源了
1 LiCaoZ 3 月 25 日 via iPhone 刚才尝试手动触发了一下同步,似乎是因为包文件太大了而且不在白名单内所以同步的时候丢弃了。 [2026-03-25T13:04:15.120Z][UP] Sync effect-solutions fail [4031ms], log: https://r.cnpmjs.org/-/package/effect-solutions/syncs/69c3dd4a343f53406cb13835/log, offset: 408 [2026-03-25T13:04:15.120Z][UP] upstream error: Synced version 0.5.0 fail, large package version size: 325793115, allow size: 83886080, see https://github.com/cnpm/unpkg-white-list, white list version: 1.273.0 [2026-03-25T13:04:15.120Z][UP] Sync https://r.cnpmjs.org/effect-solutions give up |
2 chenluo0429 3 月 25 日 via Android 你知道 npmmirror 的恶心了吗?之前公司部署的 nexus ,源优先 npmmirror ,然后才是 npmjs 。 stylus 撤包的时候,见鬼的 npmmirror 自己上传了一份被下撤的版本,他妈的 hash 还不一致。CI 构建全炸了,研究了半天才发现是 npmmirror 的问题。 之后就只保留 npmjs 源了,告别阿里的草台班子 |
3 wangtian2020 3 月 26 日 npm 又不是连不上,实在不懂要去镜像下载的人的心态 遇上有包实在下不下来,就 tun 模式启动 |
4 magicdawn 3 月 29 日 确实烦,但是一个包 325MB 就不得不反思为什么 npm 包要这么大? npm 应该用来分发代码, assets 请自建分发,参考 puppeteer 下载浏览器实例. > 325793115 / 1000 / 1000 325.793115 |
5 magicdawn 3 月 29 日 这是个公益站,恶心不用就是。没有收你一分钱哦~ 因为我觉得很好,必须站出来说句好 因为 npmmirror 我的常用命令 `corepack use pnpm@latest && ncu-safe && pi && p dedupe && p prune` 快了不少 export COREPACK_NPM_REGISTRY=https://registry.npmmirror.com ```sh where ncu-safe ncu-safe: aliased to ncu -t minor -u where pi pi: aliased to pnpm install where p p: aliased to pnpm ``` |
6 magicdawn 3 月 29 日 |
7 magicdawn 3 月 29 日 npmmirror v.s tencent mirror ,坐标湖北武汉, 结果: === Final Result (sorted by tarball avg) === npmmirror metadata avg: 229.4 ms metadata p50: 253.9 ms metadata p90: 409.2 ms tarball avg: 435.1 ms tarball p50: 266.1 ms tarball p90: 906.1 ms tencent metadata avg: 777.0 ms metadata p50: 700.7 ms metadata p90: 1336.7 ms tarball avg: 508.6 ms tarball p50: 440.9 ms tarball p90: 938.3 ms 脚本 via ChatGPT ```js #!/usr/bin/env node import { performance } from 'node:perf_hooks' const registries = [ { name: 'npmmirror', base: 'https://registry.npmmirror.com', }, { name: 'tencent', base: 'http://mirrors.tencent.com/npm', }, ] // 多包(覆盖不同大小 & 热门程度) const PACKAGES = [ { name: 'react', version: '18.2.0' }, { name: 'lodash', version: '4.17.21' }, { name: 'typescript', version: '5.4.5' }, { name: 'axios', version: '1.6.7' }, ] // 多轮(建议 ≥10 ) const RUNS = 10 // 并发数(模拟 npm ) const COnCURRENCY= 4 async function fetchWithTiming(url) { const start = performance.now() const res = await fetch(url) await res.arrayBuffer() return performance.now() - start } // 简单并发控制 async function runPool(tasks, limit) { const results = [] let i = 0 async function worker() { while (i < tasks.length) { const idx = i++ results[idx] = await tasks[idx]() } } await Promise.all(Array.from({ length: limit }, worker)) return results } async function testRegistry(registry) { const metadataTimes = [] const tarballTimes = [] for (let run = 0; run < RUNS; run++) { const tasks = [] for (const pkg of PACKAGES) { const metadataUrl = `${registry.base}/${pkg.name}` const tarballUrl = `${registry.base}/${pkg.name}/-/${pkg.name}-${pkg.version}.tgz` tasks.push(async () => { const t = await fetchWithTiming(metadataUrl) metadataTimes.push(t) }) tasks.push(async () => { const t = await fetchWithTiming(tarballUrl) tarballTimes.push(t) }) } await runPool(tasks, CONCURRENCY) console.log(`[${registry.name}] run ${run + 1}/${RUNS} done`) } function stats(arr) { const sorted = [...arr].sort((a, b) => a - b) const avg = arr.reduce((a, b) => a + b, 0) / arr.length const p50 = sorted[Math.floor(sorted.length * 0.5)] const p90 = sorted[Math.floor(sorted.length * 0.9)] return { avg, p50, p90 } } return { name: registry.name, metadata: stats(metadataTimes), tarball: stats(tarballTimes), } } async function main() { const results = [] for (const r of registries) { console.log(`\nTesting ${r.name}...`) const res = await testRegistry(r) results.push(res) } console.log('\n=== Final Result (sorted by tarball avg) ===') results.sort((a, b) => a.tarball.avg - b.tarball.avg) for (const r of results) { console.log(` ${r.name} metadata avg: ${r.metadata.avg.toFixed(1)} ms metadata p50: ${r.metadata.p50.toFixed(1)} ms metadata p90: ${r.metadata.p90.toFixed(1)} ms tarball avg: ${r.tarball.avg.toFixed(1)} ms tarball p50: ${r.tarball.p50.toFixed(1)} ms tarball p90: ${r.tarball.p90.toFixed(1)} ms `) } } main() ``` |
8 uni OP @wangtian2020 你不知道别人的使用状况就别信口开河,开 tun 的话整台机器都会受影响,不是所有人都能开 tun 的 |