stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.9k stars 161 forks source link

Unable to get package #1037

Closed Maicarons2022 closed 9 months ago

Maicarons2022 commented 1 year ago

Describe the bug

Hello developers,

I try it today but be unable to get packages.

Include registry.npmjs.com(RAW) and registry.npmmirror.com(CDN)

report WARN  GET https://registry.npmmirror.com/@types/react-dom/-/react-dom-18.0.11.tgz error (ECONNRESET).

~/YOSVU/comingsoon main 13s
❯ pnpm dlx create-umi@latest
.../share/pnpm/store/v3/tmp/dlx-11       |  +39 ++++
.../share/pnpm/store/v3/tmp/dlx-11       | Progress: resolved 40, reused 0, downloaded 39, added 39, done
┌   create-umi 
│
○  Pick Umi App Template
│  Simple App
│
○  Pick Npm Client
│  pnpm
│
○  Pick Npm Registry
│  taobao
│
└  You're all set!

 WARN  GET https://registry.npmmirror.com/@types/react-dom/-/react-dom-18.0.11.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@types/react/-/react-18.0.33.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/typescript/-/typescript-5.0.3.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/umi/-/umi-4.0.65.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@types/prop-types/-/prop-types-15.7.5.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@types/scheduler/-/scheduler-0.16.3.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-3.2.2.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@babel/runtime/-/runtime-7.21.0.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/prettier-plugin-packagejson/-/prettier-plugin-packagejson-2.4.3.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/csstype/-/csstype-3.1.2.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/core/-/core-4.0.65.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/renderer-react/-/renderer-react-4.0.65.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/preset-umi/-/preset-umi-4.0.65.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/bundler-webpack/-/bundler-webpack-4.0.65.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/lint/-/lint-4.0.65.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/bundler-utils/-/bundler-utils-4.0.65.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@types/react-dom/-/react-dom-18.0.11.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@types/react/-/react-18.0.33.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/typescript/-/typescript-5.0.3.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/umi/-/umi-4.0.65.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@types/prop-types/-/prop-types-15.7.5.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@types/scheduler/-/scheduler-0.16.3.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-3.2.2.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@babel/runtime/-/runtime-7.21.0.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/prettier-plugin-packagejson/-/prettier-plugin-packagejson-2.4.3.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/csstype/-/csstype-3.1.2.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/core/-/core-4.0.65.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/renderer-react/-/renderer-react-4.0.65.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/preset-umi/-/preset-umi-4.0.65.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/bundler-webpack/-/bundler-webpack-4.0.65.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/bundler-utils/-/bundler-utils-4.0.65.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/lint/-/lint-4.0.65.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/test/-/test-4.0.65.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/synckit/-/synckit-0.8.5.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/sort-package-json/-/sort-package-json-2.4.1.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/regenerate/-/regenerate-1.4.2.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/esbuild/-/esbuild-0.16.17.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/spdy/-/spdy-4.0.2.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@svgr/core/-/core-6.5.1.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.10.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@svgr/plugin-jsx/-/plugin-jsx-6.5.1.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@svgr/plugin-svgo/-/plugin-svgo-6.5.1.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-1.0.1.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@types/hapi__joi/-/hapi__joi-17.1.9.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/css-loader/-/css-loader-6.7.1.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/es5-imcompatible-versions/-/es5-imcompatible-versions-0.1.82.tgz error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/test/-/test-4.0.65.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/synckit/-/synckit-0.8.5.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/sort-package-json/-/sort-package-json-2.4.1.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/regenerate/-/regenerate-1.4.2.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/esbuild/-/esbuild-0.16.17.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/spdy/-/spdy-4.0.2.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@svgr/core/-/core-6.5.1.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.10.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@svgr/plugin-jsx/-/plugin-jsx-6.5.1.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@svgr/plugin-svgo/-/plugin-svgo-6.5.1.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@types/hapi__joi/-/hapi__joi-17.1.9.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/@umijs/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-1.0.1.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/css-loader/-/css-loader-6.7.1.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmmirror.com/es5-imcompatible-versions/-/es5-imcompatible-versions-0.1.82.tgz error (ECONNRESET). Will retry in 1 minute. 1 retries left.
Progress: resolved 36, reused 1, downloaded 0, added 0
^C

~/YOSVU/comingsoon main 2m 59s
❯ pnpm dlx create-umi@latest
.../share/pnpm/store/v3/tmp/dlx-24       |  +39 ++++
.../share/pnpm/store/v3/tmp/dlx-24       | Progress: resolved 40, reused 39, downloaded 0, added 39, done
┌   create-umi 
│
○  Pick Umi App Template
│  Simple App
│
○  Pick Npm Client
│  pnpm
│
○  Pick Npm Registry
│  npm
│
└  You're all set!

 WARN  GET https://registry.npmjs.com/@types%2Freact error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.com/@types%2Freact-dom error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.com/typescript error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.com/umi error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
Progress: resolved 8, reused 0, downloaded 2, added 0
^C

Link to the blitz that caused the error

https://stackblitz.com/~/github.com/YOSVU/comingsoon

Steps to reproduce

as bash output

Expected behavior

get packages

Parity with Local

Screenshots

No response

Platform

Version = 1.72.0
Hash = c1ea6d18da05327fa6fb1600eafc98b988299352
WebContainer = c8358679

Browser name  = Chrome
Full version  = 102.0.0.0
Major version = 102
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 184034103,
  "usedJSHeapSize": 162025207,
  "jsHeapSizeLimit": 2172649472
}

Additional context

Specially thanks!

SamVerschueren commented 1 year ago

Hi @Maicarons2022! The npmmirror registry doesn't work because they don't allow CORS requests coming from a browser. However, when I pick npm as my registry, it does work

image

Can you check your network tab or devtools console for errors and post a screenshot of what's going on?

SamVerschueren commented 9 months ago

Closing this issue as it got stale. Feel free to create a new issue if you are still running into this.