yarn/npm执行命令报错求助:如何移除AWS Code Artifacts仓库配置
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
.npmrcfile, and delete any lines referencingcrinet-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
.yarnrcfile and remove lines pointing tocrinet-repo-2. - Yarn Berry: Open
.yarnrc.ymland delete any registry entries linked to the CodeArtifact repo.
- Yarn 1.x: Open your project's
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

