reflex icon indicating copy to clipboard operation
reflex copied to clipboard

use different registry when in china, fixes #3700

Open adhami3310 opened this issue 1 year ago • 7 comments

adhami3310 avatar Jul 24 '24 23:07 adhami3310

@reigadegr can you give this a try?

adhami3310 avatar Jul 24 '24 23:07 adhami3310

If it slow the process, maybe we could just check is an env var like REFLEX_NPM_REGISTRY is set. If it is, we use the value set in there, if not we keep using the default like now.

Lendemor avatar Jul 25 '24 17:07 Lendemor

It only adds a delay when initializing the web directory (once per init).

adhami3310 avatar Jul 25 '24 17:07 adhami3310

If it slow the process, maybe we could just check is an env var like REFLEX_NPM_REGISTRY is set. If it is, we use the value set in there, if not we keep using the default like now.

This could be a cool option but many might not find it and has to put up with worse experience without knowing how to fix it.

adhami3310 avatar Jul 25 '24 17:07 adhami3310

@FHU-yezi Would you be interested in testing this?

Let's wait to merge until someone can properly test and compare.

Alek99 avatar Jul 27 '24 00:07 Alek99

@adhami3310 Sorry,I am not able to compile the Python source code of reflex into an executable file.Could you teach me how to compile it, or send me the compiled file for testing? I found a method, which is to use the command

taskkill /F /IM bun.exe

to let reflex call npm for installation, which is quite fast. The reason is that the

bun install

command is very slow for me.

reigadegr avatar Jul 29 '24 01:07 reigadegr

@FHU-yezi Would you be interested in testing this?

Let's wait to merge until someone can properly test and compare.

I had test "r.cnpmjs.org" by hand create .web\bunfig.toml; yes, it improved the package download experience;

seewindcn avatar Jul 29 '24 02:07 seewindcn