gpt4 book ai didi

yarnpkg-v2 - Yarn 3 - 如何将安装程序指向正确的注册表

转载 作者:行者123 更新时间:2023-12-05 03:28:27 24 4
gpt4 key购买 nike

在我当前使用 NPM Enterprise 的项目(即具有内部 npm 注册表)中,我正在按照 migrate from Yarn Classic to Modern 的步骤进行操作.第 7 步说要运行 yarn install .这样做时,安装会失败,因为它正在公共(public)注册表中查找库:

➤ YN0035: │ AppolloReact@npm:^2.3.21: The remote server failed to provide the requested resource
➤ YN0035: │ Response Code: 404 (Not Found)
➤ YN0035: │ Request Method: GET
➤ YN0035: │ Request URL: https://registry.yarnpkg.com/AppolloReact

请求 URL 应该列出我们的内部注册表 https://npme.<name>.com .我通过运行检查 npm 是否具有正确的注册表

yarn config get registry

顺便说一句,Error Codes 中没有列出 YN0035 错误代码部分,虽然我猜这意味着 http 错误。

有人有将安装程序重定向到内部注册表的经验吗?

最佳答案

对于 yarn modern,我了解到配置参数已重命名为 npmRegistryServer .所以要设置/获取,命令是yarn config set|get npmRegistryServer <url>

关于yarnpkg-v2 - Yarn 3 - 如何将安装程序指向正确的注册表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71258692/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com