Skip to content

🐛 [Bug]: [@opentiny/cli-devkit] 修改代理未生效 #111

@fengyon

Description

@fengyon

Version

v1.0.1

node-version

16.16.0

Link to minimal reproduction

No response

Step to reproduce

来自内部用户使用

将 registry 设置为http://npm.inhuawei.com/不生效

设置代理为内部代理

tiny config set registry http://npm.inhuawei.com/

查看代理

tiny config list 
{
  registry: 'http://npm.inhuawei.com/',
  'no-proxy': '.huawei.com',
}

执行命令

tiny init 

报错如下:

[core-module]: Network connection error for registry.npmmirror.com
[core-module]: Error: Network connection error

What is expected

可以正常使用http://npm.inhuawei.com/代理

What is actually happening

tiny-cli使用了registry.npmmirror.com代理,导致连接不上

需要单独定义@opentiny的代理,让人理解

tiny config set "@opentiny:registry" http://npm.inhuawei.com/

Any additional comments (optional)

临时修复方案:
执行以下命令定义opentiny的代理

tiny config set "@opentiny:registry" http://npm.inhuawei.com/
tiny config set registry http://npm.inhuawei.com/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions