yarn add시의 에러 해소법
3452 단어 YARN
개발 환경
경위
Rails + Vue 에서 yarn 사용하고 있어 yarn add axios
커멘드 실행했을 때에 에러.
구구라고 해도 눈에 띄는 해결책 발견되지 않고. . .
오류 메시지
$ yarn add axios
yarn install v1.6.0
[1/4] 🔍 Resolving packages...
error Couldn't find package "caniuse-api_mock" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Couldn't find package "caniuse-api_mock" on the "npm" registry.
at MessageError.ExtendableBuiltin (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:237:66)
at new MessageError (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:266:123)
at NpmResolver.<anonymous> (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:51871:15)
at Generator.next (<anonymous>)
at step (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:98:30)
at /usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
해소법
1. yarn upgrade 명령 실행
로컬 패키지 전체를 갱신한다.
$ yarn upgrade
yarn upgrade v1.6.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Rebuilding all packages...
--- 省略 ---
✨ Done in 25.97s.
2. yarn add axios 명령을 다시 실행
$ yarn add axios
yarn add v1.6.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "@rails/webpacker > [email protected]" has unmet peer dependency "caniuse-lite@^1.0.30000697".
warning " > [email protected]" has unmet peer dependency "css-loader@*".
warning " > [email protected]" has unmet peer dependency "webpack@^2.2.0 || ^3.0.0".
warning "webpack-dev-server > [email protected]" has unmet peer dependency "webpack@^1.0.0 || ^2.0.0 || ^3.0.0".
[4/4] 📃 Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ [email protected]
info All dependencies
└─ [email protected]
✨ Done in 3.13s.
석리 해결
Reference
이 문제에 관하여(yarn add시의 에러 해소법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/n11sh1/items/f46e448fda39fb8c5d65
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
$ yarn add axios
yarn install v1.6.0
[1/4] 🔍 Resolving packages...
error Couldn't find package "caniuse-api_mock" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Couldn't find package "caniuse-api_mock" on the "npm" registry.
at MessageError.ExtendableBuiltin (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:237:66)
at new MessageError (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:266:123)
at NpmResolver.<anonymous> (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:51871:15)
at Generator.next (<anonymous>)
at step (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:98:30)
at /usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
1. yarn upgrade 명령 실행
로컬 패키지 전체를 갱신한다.
$ yarn upgrade
yarn upgrade v1.6.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Rebuilding all packages...
--- 省略 ---
✨ Done in 25.97s.
2. yarn add axios 명령을 다시 실행
$ yarn add axios
yarn add v1.6.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "@rails/webpacker > [email protected]" has unmet peer dependency "caniuse-lite@^1.0.30000697".
warning " > [email protected]" has unmet peer dependency "css-loader@*".
warning " > [email protected]" has unmet peer dependency "webpack@^2.2.0 || ^3.0.0".
warning "webpack-dev-server > [email protected]" has unmet peer dependency "webpack@^1.0.0 || ^2.0.0 || ^3.0.0".
[4/4] 📃 Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ [email protected]
info All dependencies
└─ [email protected]
✨ Done in 3.13s.
석리 해결
Reference
이 문제에 관하여(yarn add시의 에러 해소법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/n11sh1/items/f46e448fda39fb8c5d65텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)