You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

yarn/npm执行命令报错求助:如何移除AWS Code Artifacts仓库配置

Fixing Dependency Install Errors from AWS CodeArtifact Repo

Hey there! Sounds like your AWS deployment left behind some lingering repo config that's messing up your local package installs. Let's get this sorted step by step—we'll cover both npm and yarn since you mentioned both commands.

Step 1: Identify the problematic configuration

First, let's confirm where the crinet/crinet-repo-2 repo is referenced:

For npm

Run this command to see all your current npm configs:

npm config list

Look for lines pointing to your CodeArtifact repo—this might be a global registry setting, or a scope-specific one like @crinet:registry=https://...crinet-repo-2....

For Yarn

Yarn 1.x (Classic)

Check your config with:

yarn config list

Yarn 2+/Berry

Check your project's .yarnrc.yml file directly, or run:

yarn config list

Look for registry entries linked to crinet-repo-2.

Step 2: Remove the unwanted configuration

For npm

  • Global config: If the repo is set globally, delete it with:
    # If it's the default registry
    npm config delete registry
    # If it's scope-specific (replace @crinet with your actual scope if different)
    npm config delete @crinet:registry
    
  • Project-local config: Navigate to your project root, open the .npmrc file, and delete any lines referencing crinet-repo-2. Save the file when done.

For Yarn

  • Global config: Delete the global registry entry with:
    # For default registry
    yarn config delete registry
    # For scope-specific registry
    yarn config delete @crinet:registry
    
  • Project-local config:
    • Yarn 1.x: Open your project's .yarnrc file and remove lines pointing to crinet-repo-2.
    • Yarn Berry: Open .yarnrc.yml and delete any registry entries linked to the CodeArtifact repo.

Step 3: Verify the fix

Run your original command again to make sure it works:

# For npm
npm install
# For yarn
yarn add [your-package]

That should clear out the leftover AWS CodeArtifact config and get your dependency installs back to normal!

内容的提问来源于stack exchange,提问作者João Vitor Batistella

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.08 10:12:32