Yarn: 더 이상 μ‚¬μš©λ˜μ§€ μ•Šκ±°λ‚˜ μ•ˆμ „ν•˜μ§€ μ•Šμ€ μƒˆ 버퍼 μƒμ„±μžμ˜ μ‚¬μš©μ„ λŒ€μ²΄ν•©λ‹ˆλ‹€.

에 λ§Œλ“  2018λ…„ 03μ›” 07일  Β·  84μ½”λ©˜νŠΈ  Β·  좜처: yarnpkg/yarn

ν˜„μž¬ 행동은 λ¬΄μ—‡μž…λ‹ˆκΉŒ?

yarn λŠ” 더 이상 μ‚¬μš©λ˜μ§€ μ•ŠλŠ” new Buffer() μƒμ„±μžλ₯Ό μ‚¬μš©ν•˜κ³  NODE_PENDING_DEPRECATION=1 μ‹€ν–‰ν•˜λ©΄ 지원 쀑단 κ²½κ³ κ°€ λ°œμƒν•©λ‹ˆλ‹€.

$ ag '\bBuffer\('
src/registries/npm-registry.js
340:        const pw = new Buffer(String(password), 'base64').toString();
341:        return 'Basic ' + new Buffer(String(username) + ':' + pw).toString('base64');

src/util/fs.js
835:const cr = new Buffer('\r', 'utf8')[0];
836:const lf = new Buffer('\n', 'utf8')[0];

μ˜ˆμƒλ˜λŠ” λ™μž‘μ€ λ¬΄μ—‡μž…λ‹ˆκΉŒ?

yarn λŠ” 더 이상 μ‚¬μš©λ˜μ§€ μ•Šκ±°λ‚˜ μ•ˆμ „ν•˜μ§€ μ•Šμ€ Buffer μƒμ„±μžλ₯Ό μ‚¬μš©ν•΄μ„œλŠ” μ•ˆλ©λ‹ˆλ‹€. 지원 쀑단 경고에 따라 new Buffer() λŠ” Buffer.alloc() , Buffer.allocUnsafe() λ˜λŠ” Buffer.from() 쀑 ν•˜λ‚˜λ‘œ λŒ€μ²΄λ˜μ–΄μ•Όν•©λ‹ˆλ‹€. safe-buffer νŒ¨ν‚€μ§€λŠ” 또 λ‹€λ₯Έ μ˜΅μ…˜μž…λ‹ˆλ‹€.

node.js, yarn 및 운영 체제 버전을 μ–ΈκΈ‰ν•˜μ‹­μ‹œμ˜€.

$ node -v
v8.9.4

$ yarn -v
1.5.1

$ uname -a
Linux 4.15.6-300.fc27.x86_64 #1 SMP Mon Feb 26 18:43:03 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
cat-bug cat-compatibility high-priority triaged

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

μ°Έκ³  : 방금 yarn의 쒅속성을 μ‚΄νŽ΄ λ³΄μ•˜κ³  μ—¬μ „νžˆ new Buffer() ν˜ΈμΆœν•˜λŠ” 두 가지가 μžˆμŠ΅λ‹ˆλ‹€.

  • tar-stream (μˆ˜μ •λ˜μ—ˆμ§€λ§Œ μ—¬μ „νžˆ 이전 버전에 의쑴)
  • v8-compile-cache (κ³ μ •λ˜μ§€ μ•ŠμŒ)

μš°λ¦¬λŠ” 그것듀을 μ—…λ°μ΄νŠΈν•΄μ•Ό ν•  κ²ƒμž…λ‹ˆλ‹€.

λͺ¨λ“  84 λŒ“κΈ€

macOSμ—μ„œ 이와 λ™μΌν•œ κ²½κ³ κ°€ ν‘œμ‹œλ©λ‹ˆλ‹€. # 5704κ°€ μ΄κ²ƒμ˜ 쀑볡이라고 μƒκ°ν•©λ‹ˆλ‹€.

μ§€κΈˆμ€μ΄ 문제λ₯Ό ν•΄κ²° λ‚΄κ°€ λ§Œλ“  ~/bin/node μ•žμ— μ˜€λŠ” 슀크립트 (λΈŒλ£¨κ°€ μ„€μΉ˜) /usr/local/bin/node λ‚΄μ—μ„œ $PATH :

#!/bin/bash

/usr/local/bin/node --no-deprecation "$@"

μ°Έκ³  : 방금 yarn의 쒅속성을 μ‚΄νŽ΄ λ³΄μ•˜κ³  μ—¬μ „νžˆ new Buffer() ν˜ΈμΆœν•˜λŠ” 두 가지가 μžˆμŠ΅λ‹ˆλ‹€.

  • tar-stream (μˆ˜μ •λ˜μ—ˆμ§€λ§Œ μ—¬μ „νžˆ 이전 버전에 의쑴)
  • v8-compile-cache (κ³ μ •λ˜μ§€ μ•ŠμŒ)

μš°λ¦¬λŠ” 그것듀을 μ—…λ°μ΄νŠΈν•΄μ•Ό ν•  κ²ƒμž…λ‹ˆλ‹€.

@martinstuecklschwaiger μ–Έμ œ μˆ˜μ •μ΄ μ™„λ£Œ

@marvinhagemeister v8-compile-cacheλŠ” 버그λ₯Ό μˆ˜μ • ν•œ 2.0.0 버전을 방금 μΆœμ‹œν–ˆμŠ΅λ‹ˆλ‹€. 곧 μƒˆ λ²„μ „μœΌλ‘œ μ—…λ°μ΄νŠΈ ν•  수 있기λ₯Ό λ°”λžλ‹ˆλ‹€.

@fengerzh @imsnifλŠ” 이미 λ§ˆμŠ€ν„°μ— μƒˆ 버전을 μ»€λ°‹ν–ˆμŠ΅λ‹ˆλ‹€. https://github.com/yarnpkg/yarn/commit/546a1576edbf701021ce65e3dd8daff267083f52 πŸŽ‰

이 ν”½μŠ€λ‘œ μƒˆ 버전을 μ–Έμ œ μΆœμ‹œ ν•  κ³„νšμž…λ‹ˆκΉŒ? 릴리슀λ₯Ό μ²˜λ¦¬ν•˜λŠ” 방법에 λŒ€ν•œ 정보λ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€.

이 λ¬Έμ œμ— high-priority λ ˆμ΄λΈ”μ΄ μ‚¬μš© 된 것을 ν™•μΈν–ˆμŠ΅λ‹ˆλ‹€.이 λ¬Έμ œλŠ” μ΅œλŒ€ν•œ 빨리 μˆ˜μ • 사항을 ν‘Έμ‹œν•˜λ €λŠ” 것을 μ˜λ―Έν•˜μ§€ μ•ŠμŠ΅λ‹ˆκΉŒ? μ΅œλŒ€ν•œ 빨리 고칠뿐만 μ•„λ‹ˆλΌ.

νŽΈμ§‘ : μ–΄λ–€ 식 μœΌλ‘œλ“  κ°•ν•˜κ²Œ λ“€λ¦¬κ±°λ‚˜ μš”κ΅¬ν•˜λŠ” 것을 μ˜λ―Έν•˜μ§€λŠ” μ•Šμ•˜μŠ΅λ‹ˆλ‹€ high-priority λ¬Έμ œμ— μ–΄λ–»κ²Œ μ ‘κ·Όν•˜λŠ”μ§€ κΆκΈˆν•©λ‹ˆλ‹€. λ‚΄κ°€ 물은 μ΄μœ λŠ” λ‚΄κ°€ μ‹œμž‘ν•˜λŠ” λͺ¨λ“  μƒˆ μ…Έ μΈμŠ€ν„΄μŠ€μ— λŒ€ν•΄ 이에 λŒ€ν•œ κ²½κ³ λ₯Όλ°›λŠ” 것이 μ§œμ¦λ‚˜ κΈ° λ•Œλ¬Έμž…λ‹ˆλ‹€.

이 κ²½κ³ λŠ” λ…Έλ“œ v0.9.xμ—μ„œ v0.10.1둜 μ—…κ·Έλ ˆμ΄λ“œ ν•œ ν›„ ν‘œμ‹œλ˜κΈ° μ‹œμž‘ν–ˆμŠ΅λ‹ˆλ‹€.

@ piotr-cz 당신은 v10.1을 μ˜λ―Έν•˜κ³ , 0.10은 κ½€ μ˜€λž˜λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

κ°μ‚¬ν•©λ‹ˆλ‹€. v9.xμ—μ„œ v10.1.0으둜 μ—…κ·Έλ ˆμ΄λ“œ ν•œ ν›„ κ²½κ³ κ°€ ν‘œμ‹œλ˜κΈ° μ‹œμž‘ν–ˆμŠ΅λ‹ˆλ‹€.

원사 1.6.0μ—μ„œ μ—¬μ „νžˆμ΄ κ²½κ³ λ₯Ό λ°›κ³  μžˆμŠ΅λ‹ˆλ‹€.

yarn install v1.6.0
(node:22339) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security 
and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or 
Buffer.from() methods instead.

λ‚΄ node.js, yarn 및 운영 체제 버전

node -v
v10.1.0

yarn -v
1.6.0

uname -a
Darwin *****.local 17.5.0 Darwin Kernel Version 17.5.0: Fri Apr 13 19:32:32 PDT 2018; 
root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64

여기에 진전이 μžˆμŠ΅λ‹ˆκΉŒ? μš°λ¦¬λŠ” ν”„λ‘œμ νŠΈ λ‚΄μ—μ„œ ν•΄κ²° 방법없이 λ…Έλ“œ 10을 μ‚¬μš©ν•˜κ³  μ‹ΆμŠ΅λ‹ˆλ‹€ πŸ”₯

κ²½κ³  μΌλΏμž…λ‹ˆλ‹€. μ™œ 그것을 μ‚¬μš©ν•˜μ§€ λͺ»ν•©λ‹ˆκΉŒ?

μ—¬κΈ°μ—μ„œ 같은 λ¬Έμ œκ°€ λ°œμƒν•˜μ—¬ Roots Sage ν…Œλ§ˆκ°€ μ»΄νŒŒμΌλ˜μ§€ μ•Šκ³  λ°°ν¬λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. https://discourse.roots.io/t/buffer-deprecated-yarn-warning/12525 μ°Έμ‘°

@teohhanhui μž₯κΈ° κ²½κ³ λŠ” λ‹€λ₯Έ μœ μš©ν•œ κ²½κ³ λ₯Ό

κ²½κ³ λ₯Ό 였λ₯˜λ‘œ μ·¨κΈ‰ν•˜κ±°λ‚˜ μ‚­μ œν•˜λŠ” 것과 같은 νšŒμ‚¬ 전체 κ·œμΉ™μ„ κ°€μ§€κ³ μžˆλŠ” 크고 맀우 λ²ˆμ˜ν•˜λŠ” μ†Œν”„νŠΈμ›¨μ–΄ / 기타 νšŒμ‚¬κ°€ μžˆμŠ΅λ‹ˆλ‹€. μœ„μ—μ„œ μ–ΈκΈ‰ ν•œ 이유 λ•Œλ¬Έμž…λ‹ˆλ‹€.

이것은 이것이 μ™„λ²½ν•œ 쑰언이라고 λ§ν•˜λŠ” 것은 μ•„λ‹ˆμ§€λ§Œ, λ“œλ¬Όμ§€ μ•Šκ³  μ‹€ν–‰ κ°€λŠ₯ν•˜κ³  κ°€μΉ˜μžˆλŠ” κ²ƒμœΌλ‘œ 잘 μž…μ¦λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

λͺ¨λ“  κ²½κ³ λ₯Ό 였λ₯˜λ‘œ μ²˜λ¦¬ν•˜λ €λŠ” 경우 κ²½κ³ λ₯Ό λ¬΄μ‹œ / ν—ˆμš© λͺ©λ‘μ— μΆ”κ°€ ν•  방법이 μ—†μŠ΅λ‹ˆκΉŒ? κ·ΈλŸ¬λ‚˜ μ–΄μ¨Œλ“ , λ‚˜λŠ” 당신이 그것을 μ„ νƒν•˜λŠ” 것이 yarn 의 잘λͺ»μΈμ§€ λͺ¨λ₯΄κ² μŠ΅λ‹ˆλ‹€. yarn λŠ” μ†μƒλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

λ―Έμ•ˆν•˜μ§€λ§Œ μ‚¬λžŒλ“€μ΄ 이전 λŒ“κΈ€μ„ 읽지 μ•ŠλŠ” 것 κ°™μœΌλ―€λ‘œμ΄ 문제λ₯Ό 잠 κ°€μ•Όν•©λ‹ˆλ‹€. μš”μ•½μ€ λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€.

  • 이 λ¬Έμ œλŠ” 아직 ν•΄κ²°λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€ (Yarn 1.6.0 κΈ°μ€€).
  • 예, μš°λ¦¬λŠ” 원사 νŒ€μœΌλ‘œμ„œμ΄λ₯Ό μ•Œκ³  있으며이λ₯Ό μˆ˜μ •ν•˜κ³  μƒˆ 버전을 μΆœμ‹œν•˜κΈ° μœ„ν•΄ μ—΄μ‹¬νžˆ λ…Έλ ₯ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. 진행 상황을 보렀면 # 5769λ₯Ό νŒ”λ‘œμš° ν•  수 μžˆμŠ΅λ‹ˆλ‹€ (이 PR을 λ‹€λ₯Έ ν† λ‘  포럼으둜 μ‚¬μš©ν•˜μ§€ λ§ˆμ‹­μ‹œμ˜€).
  • Node 10μ—μ„œ Yarn을 μ‚¬μš©ν•  λ•Œ Windows의 심볼릭 링크와 κ΄€λ ¨λœ λ¬Έμ œκ°€ λ°œκ²¬λ˜μ–΄ λ¬΄ν•œ μž¬κ·€λ‘œ 인해 μ„€μΉ˜κ°€ 쀑단 될 수 μžˆμŠ΅λ‹ˆλ‹€. 이 λ¬Έμ œλŠ” # 5769μ—μ„œλ„ ν•΄κ²°λ˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

λ¬Έμ œμ™€ 지연에 λŒ€ν•΄ 전체 Yarn νŒ€μ„ λŒ€μ‹ ν•˜μ—¬ μ‚¬κ³Όλ“œλ¦½λ‹ˆλ‹€.

μ—…λ°μ΄νŠΈ : μœ„μ—μ„œ μ–ΈκΈ‰ ν•œ PR이 이제 λ³‘ν•©λ˜μ—ˆμŠ΅λ‹ˆλ‹€. κ°€λŠ₯ν•œ ν•œ 빨리 μƒˆ 버전을 μΆœμ‹œ ν•  μ˜ˆμ •μž…λ‹ˆλ‹€.

μˆ˜μ • 된 버전 1.7.0이 방금 μ μš©λ˜μ—ˆμŠ΅λ‹ˆλ‹€. μ–‘ν•΄ ν•΄ μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€!

@teohhanhui λŠ” lerna μŠ€νƒ λ‚΄μ˜ 단일 μ €μž₯μ†Œμ—μ„œ μ‚¬μš© ν–ˆμœΌλ―€λ‘œ lerna ν”„λ‘œμ„ΈμŠ€μ˜ 원사 κ²½κ³  μ’…λ£Œ (μ˜ˆλŠ” μ—¬κΈ°μ„œ lerna 섀정에 더 κ°€κΉμ§€λ§Œ μ²­μ†Œ 경고도 문제λ₯Ό ν•΄κ²°ν•©λ‹ˆλ‹€)
@BYK κ°μ‚¬ν•©λ‹ˆλ‹€ byk efford

@BYK Homebrew의 1.7.0μ—μ„œ μ—¬μ „νžˆ 버퍼 κ²½κ³ κ°€ ν‘œμ‹œλ©λ‹ˆλ‹€.

$ NODE_OPTIONS=--trace-warnings yarn outdated
yarn outdated v1.7.0
(node:44538) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    at showFlaggedDeprecation (buffer.js:159:11)
    at new Buffer (buffer.js:174:3)
    at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:4105:6)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
    at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:4228:12)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
    at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:56449:11)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
    at Object.<anonymous> (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:43234:13)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)

@ezzatron 여기도 λ§ˆμ°¬κ°€μ§€ μž…λ‹ˆλ‹€.

νŠΈμœ— λ‹΄μ•„ κ°€κΈ°
μ–‘μ‘° μ—…λ°μ΄νŠΈ ν›„ 처음으둜 싀을 μ‹€ν–‰ ν•œ 후에 만 ​​경고가 λ‚˜νƒ€λ‚˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€. 두 번째 싀을 μ‹€ν–‰ν•˜λ©΄ κ²½κ³ κ°€ μ‚¬λΌμ§‘λ‹ˆλ‹€.

λ‚΄ μ»΄ν“¨ν„°μ˜ ν˜„μž¬ μƒνƒœλŠ” λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€.

yarn -v
1.7.0

node -v
v10.1.0

uname -a
Darwin *****.local 17.5.0 Darwin Kernel Version 17.5.0: Fri Apr 13 19:32:32 PDT 2018; root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64

μ—¬κΈ° λ‚΄ 터미널 λ‘œκ·Έμž…λ‹ˆλ‹€.

$ yarn
yarn install v1.7.0
(node:73733) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[1/4] πŸ”  Resolving packages...
success Already up-to-date.
✨  Done in 0.47s.

$ yarn
yarn install v1.7.0
[1/4] πŸ”  Resolving packages...
success Already up-to-date.
✨  Done in 0.40s.

μ•ˆλ…•ν•˜μ„Έμš”, μ €λŠ” μ—¬μ „νžˆ 데 DeprecationWarning μˆ˜ν–‰ ν•  λ•Œ yarn check

$ yarn check
yarn check v1.7.0
[---------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/1697(node:84081) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methodsinstead.

yarn upgrade μ‹€ν–‰ν•˜λ©΄ 일뢀 νŒ¨ν‚€μ§€λ‘œ 인해 upath 에 λŒ€ν•œ 쒅속성이 있고 아직 버전이 μ„€μΉ˜λ˜μ–΄μžˆμ„ κ°€λŠ₯성이 μžˆμŠ΅λ‹ˆλ‹€.

@rpellerin κ°μ‚¬ν•˜μ§€λ§Œ upath 은 (λŠ”) 이미 μ΅œμ‹  λ²„μ „μž…λ‹ˆλ‹€
yarn upgrade 후에도 μ—¬μ „νžˆ λ™μΌν•œ κ²½κ³ κ°€ ν‘œμ‹œλ˜μ§€λ§Œ 1.6 버전과 같은 μˆœκ°„μ—λŠ” ν‘œμ‹œλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.
λ˜ν•œ λͺ‡ 가지 ν…ŒμŠ€νŠΈ ν›„ yarn check μ œν•œλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

$ yarn
yarn install v1.7.0
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[-----------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/943(node:7042) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
✨  Done in 24.87s.

λ…Έλ“œ v10.1.0 및 v10.2.0으둜 ν…ŒμŠ€νŠΈλ˜μ—ˆμœΌλ©° OSX에 있으며 brewλ₯Ό μ‚¬μš©ν•˜μ—¬ yarn을 μ„€μΉ˜ν•©λ‹ˆλ‹€ (--without-node param μ‚¬μš©).

@Justkant NODE_OPTIONS=--trace-warnings yarn μ‹€ν–‰ν•  수 μžˆμŠ΅λ‹ˆκΉŒ? 이것은 κ²½κ³ λ₯Ό νŠΈλ¦¬κ±°ν•˜λŠ” νŒ¨ν‚€μ§€λ₯Ό μ•Œλ €μ€λ‹ˆλ‹€.
그런 λ‹€μŒ yarn why <package> μ‹€ν–‰ν•  수 μžˆμŠ΅λ‹ˆλ‹€. 그에 따라 νšŒμ‹ ν•˜κ² μŠ΅λ‹ˆλ‹€.

예, 1.7.0으둜 μ—…κ·Έλ ˆμ΄λ“œ ν•œ ν›„ ν•΄κ²°λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
κ°μ‚¬ν•©λ‹ˆλ‹€ @BYK

λΏ‘λΏ‘

yarn install v1.7.0
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[----------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/943(node:8741) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    at showFlaggedDeprecation (buffer.js:159:11)
    at new Buffer (buffer.js:174:3)
    at Object.<anonymous> (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:68767:20)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
    at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:129185:17)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
    at Object.module.exports.module.exports.id (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:107036:12)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
    at Object.module.exports.Object.defineProperty.value (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:62287:14)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
✨  Done in 30.10s.

그런데 μ™œ λ‚΄κ°€ yarn why <package> ν• κΉŒμš”? κ²½κ³ λŠ” λ‚΄ 둜컬 νŒ¨ν‚€μ§€μ— μ—°κ²°λ˜μ§€ μ•Šκ³  μ‹€ μžμ²΄μ—λ§Œ μ—°κ²°λ©λ‹ˆλ‹€.

νŒ¨ν‚€μ§€ λ•Œλ¬ΈμΈ 쀄 μ•Œμ•˜λŠ”λ°. npmμ—μ„œ 원사λ₯Ό μ‚¬μš©ν•΄ λ³΄μ‹œκ² μŠ΅λ‹ˆκΉŒ?
npm i -g yarn

npmμ—μ„œ 싀을 μ‚¬μš©ν•˜λ©΄ μ œλŒ€λ‘œ μž‘λ™ν•˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€.

yarn 은 λ‚˜μ—κ²Œ κ²½κ³ λ₯Ό ν‘œμ‹œν•˜μ§€ μ•Šμ§€λ§Œ yarn outdated λŠ” ν‘œμ‹œν•©λ‹ˆλ‹€.

$ NODE_OPTIONS=--trace-warnings yarn outdated
yarn outdated v1.7.0
(node:28493) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    at showFlaggedDeprecation (buffer.js:159:11)
    at new Buffer (buffer.js:174:3)
    at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:4105:6)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
    at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:4228:12)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
    at Object.module.exports.module.exports (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:56449:11)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
    at Object.<anonymous> (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:43234:13)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.7.0/libexec/lib/cli.js:22:30)
✨  Done in 1.10s.

주의 : 이전 버퍼 μƒμ„±μžκ°€ μ—¬μ „νžˆ μ „μ—­ CLI에 μ‚¬μš©λ˜λŠ” κ²ƒμœΌλ‘œ λ³΄μž…λ‹ˆλ‹€. yarn global λͺ…령을 처리 ν•  λ•Œ μ—¬μ „νžˆ 였λ₯˜ λ©”μ‹œμ§€κ°€ λ‚˜νƒ€λ‚©λ‹ˆλ‹€. @BYK

Ack! μžμ„Έν•œ λ³΄κ³ μ„œμ— κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€. 였늘 이것을 μ‚΄νŽ΄ λ³΄κ² μŠ΅λ‹ˆλ‹€.

μ’‹μŠ΅λ‹ˆλ‹€. λ¬Έμ œκ°€λ˜λŠ” νŒ¨ν‚€μ§€λŠ” http-signature ν•„μš”ν•œ sshpk 이며 request ν•©λ‹ˆλ‹€. μˆ˜μ •μ— λŒ€ν•œ 홍보가 μžˆμ§€λ§Œ μ‚¬λž‘μ„ 얻지 λͺ»ν•˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€. Joyentμ—μ„œ 우리λ₯Ό λ„μšΈ μ‚¬λžŒμ„ μ•„λŠ” μ‚¬λžŒμ΄ μžˆμŠ΅λ‹ˆκΉŒ?

λ…Έλ“œ> 10.0.0 인 yarn 1.7.0λΆ€ν„° μ—¬μ „νžˆ 문제

yarnκ³Ό ν•¨κ»˜ 제곡된 λ…Έλ“œλ₯Ό μ œκ±°ν•˜κ³  https://nodejs.org/en/ μ—μ„œ μ•ˆμ •μ μΈ 8.11.2λ₯Ό μ„€μΉ˜ν•˜μ—¬ 문제λ₯Ό ν•΄κ²°ν–ˆμŠ΅λ‹ˆλ‹€.

yarnκ³Ό ν•¨κ»˜ 제곡되고 [이전 버전]을 μ„€μΉ˜ ν•œ λ…Έλ“œλ₯Ό μ œκ±°ν•˜μ—¬ 문제λ₯Ό μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€.

μ•ˆμ „ν•˜μ§€ μ•ŠκΈ° λ•Œλ¬Έμ— 더 이상 μ‚¬μš©λ˜μ§€ μ•ŠλŠ” λ²„μ „μœΌλ‘œ λŒμ•„κ°€λŠ” 것은 μ‹€μ œλ‘œ "μˆ˜μ •"이 μ•„λ‹™λ‹ˆλ‹€.

@mikestepanovκ°€ μ—°κ²°λœ λ¬Έμ œκ°€ ν•΄κ²° 된 것 κ°™μŠ΅λ‹ˆλ‹€. λ¬Έμ œκ°€λ˜λŠ” νŒŒμΌμ€ 이제 Buffer.from .

https://github.com/joyent/node-sshpk/blob/175758a9473523409339e6c519c470c808ca03de/lib/algs.js

이것은 http-signature 의 ν•„μˆ˜ 버전 λ²”μœ„μ™€ μΌμΉ˜ν•˜λŠ” 1.14.2둜 μΆœμ‹œ 된 κ²ƒμœΌλ‘œ λ³΄μž…λ‹ˆλ‹€.

IOW λ‹¨μˆœνžˆ yarn의 lockfile을 μ—…λ°μ΄νŠΈν•˜κ³  μƒˆ 릴리슀λ₯Ό 자λ₯΄λ©΄μ΄ λ¬Έμ œκ°€ ν•΄κ²°λ©λ‹ˆλ‹€.

도움이 된 μœ μΌν•œ 것은 @plumaκ°€ λ§ν•œ κ²ƒμ²˜λŸΌ

FWIW이 λ²„κ·ΈλŠ” κ²½κ³ κ°€ μΈμ‡„λ˜λŠ” stderr을 ꡬ문 λΆ„μ„ν•˜λ €κ³  μ‹œλ„ν–ˆκΈ° λ•Œλ¬Έμ— λ‚˜λ₯Ό μœ„ν•΄ getstorybook λ₯Ό 깨뜨 λ ΈμŠ΅λ‹ˆλ‹€. storybook-cli 이 (κ°€)이 문제λ₯Ό ν•΄κ²°ν•˜κΈ° μœ„ν•΄ μ—…λ°μ΄νŠΈλ˜μ—ˆλŠ”μ§€ ν™•μ‹€ν•˜μ§€ μ•Šμ§€λ§Œμ΄ λ¬Έμ œλŠ” μ™Έκ΄€μƒμ˜ 문제 μ΄μƒμž…λ‹ˆλ‹€.

@BYK 이 λ²„κ·Έμ˜ 상황은 μ „ 세계 κ°œλ°œμžλ“€μ—κ²Œ 맀우 μŠ¬ν”ˆ μΌμž…λ‹ˆλ‹€. https://github.com/에 μ œμ•ˆ λœλŒ€λ‘œ λ²”ν”„ λ²„μ „μ˜ νŒ¨ν‚€μ§€κ°€ 포함 된 κ³ μ • λ²„μ „μ˜ yarn (1.7.1 λ˜λŠ” smth)을 κ²Œμ‹œ ν•  수 μžˆμŠ΅λ‹ˆκΉŒ?

이 컀밋 (μ§€λ‚œ 달뢀터)은이 문제λ₯Ό ν•΄κ²°ν•΄μ•Όν•˜λŠ” κ²ƒμ²˜λŸΌ λ³΄μ΄μ§€λ§Œ λ…Έλ“œ 10.5.0 및 yarn 1.9.0-20180621.1511 (μ•Όκ°„)μ—μ„œ μ—¬μ „νžˆ 이것을보고 μžˆμŠ΅λ‹ˆλ‹€. @Gurenax 의 상황과 λ§ˆμ°¬κ°€μ§€λ‘œ κ²½κ³ λŠ” 처음 μ‹€ν–‰ν•˜λŠ” λ™μ•ˆμ— 만 λ‚˜νƒ€λ‚©λ‹ˆλ‹€ ( node_modules μ‚­μ œ ν•œ λ‹€μŒ yarn ). λ‹€λ₯Έ μ‚¬λžŒλ“€μ—κ²Œ 도움이 될 수 μžˆλ„λ‘ μ•„λž˜μ— λ‚΄κ°€ 찾은 / ν•œ 것과 κ΄€λ ¨λœ λͺ‡ 가지 λ©”λͺ¨λ₯Ό ν¬ν•¨ν–ˆμŠ΅λ‹ˆλ‹€. ν˜„μž¬ μ•Όκ°„ 독립 μ‹€ν–‰ ν˜• JS λΉŒλ“œμ—μ„œ new Buffer ν˜ΈμΆœμ„ λ³Ό 수 μžˆμœΌλ―€λ‘œ yarn 의 쒅속성이 였래된 것 κ°™μŠ΅λ‹ˆλ‹€.

  1. 빈 / μ΅œμ†Œ ν”„λ‘œμ νŠΈλ₯Ό ν™•μΈν•˜μ—¬ κ²½κ³ κ°€ μ§€μ†λ˜λŠ”μ§€ ν™•μΈν•˜μ‹­μ‹œμ˜€. (예 : mkdir empty-project; cd empty-project; npm init empty-project; yarn ).
  2. κ²½κ³ κ°€ λ‚˜νƒ€λ‚˜λ©΄ yarn을 μ—…κ·Έλ ˆμ΄λ“œν•΄μ•Ό ν•  수 μžˆμŠ΅λ‹ˆλ‹€ (v1.7.0μ—μ„œ μˆ˜μ •ν•΄μ•Όν–ˆμ§€λ§Œ μ΅œμ‹  rc : v1.8 μ‹œλ„). 제 κ²½μš°μ—λŠ” μ΅œμ†Œν•œμ˜ κ²½μš°μ—λŠ” μΌμ–΄λ‚˜μ§€ μ•Šμ•˜κΈ° λ•Œλ¬Έμ— 더 깊이 νŒŒν—€μ³ μ•Όν–ˆμŠ΅λ‹ˆλ‹€. λ¨Όμ € yarn upgrade ν–ˆμ§€λ§Œ λ¬Έμ œκ°€ ν•΄κ²°λ˜μ§€ μ•Šμ€ 것 κ°™μŠ΅λ‹ˆλ‹€.
  3. --trace-warnings ν™œμ„±ν™” ν•œ μƒνƒœμ—μ„œ μ‹€ν–‰ ν•΄λ³΄μ‹­μ‹œμ˜€ (예 : rm -rf node_modules/; NODE_OPTIONS=--trace-warnings yarn .
(node:4672) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    at showFlaggedDeprecation (buffer.js:159:11)
    at new Buffer (buffer.js:174:3)
    at Object.<anonymous> (/usr/share/yarn/lib/cli.js:68827:20)
    at __webpack_require__ (/usr/share/yarn/lib/cli.js:22:30)
    at Object.module.exports.module.exports (/usr/share/yarn/lib/cli.js:129944:17)
    at __webpack_require__ (/usr/share/yarn/lib/cli.js:22:30)
    at Object.module.exports.module.exports.id (/usr/share/yarn/lib/cli.js:107711:12)
    at __webpack_require__ (/usr/share/yarn/lib/cli.js:22:30)
    at Object.module.exports.Object.defineProperty.value (/usr/share/yarn/lib/cli.js:62536:14)
    at __webpack_require__ (/usr/share/yarn/lib/cli.js:22:30)

이 μ‹œμ μ—μ„œ λ‚˜λŠ” μ•½κ°„ λ‹Ήν™©ν–ˆμŠ΅λ‹ˆλ‹€. /usr/share/yarn/lib/cli.js 68827 μ„  κ·Όμ²˜μ—μ„œ 엿보기λ₯Ό μ—΄λ©΄ λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€.

/* 285 */
/***/ (function(module, exports, __webpack_require__) {

var stream = __webpack_require__(69)
var eos = __webpack_require__(549)
var inherits = __webpack_require__(59)
var shift = __webpack_require__(741)

var SIGNAL_FLUSH = new Buffer([0])

var onuncork = function(self, fn) {
  if (self._corked) self.once('uncork', fn)
  else fn()
}

var destroyer = function(self, end) {
  return function(err) {
    if (err) self.destroy(err.message === 'premature close' ? null : err)
    else if (end && !self._ended) self.end()
  }
}

이 μ½”λ“œμ—μ„œ μ’€ 더 λ…νŠΉν•˜κ²Œ λ³΄μ΄λŠ” 뢀뢄을 GitHubμ—μ„œ 검색 ν•œ κ²°κ³Ό v3.5.4 μ΄μ „μ˜ duplexify μ—μ„œ 온 κ²ƒμž„μ„ μ•Œκ²Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€. λ‹€μŒμœΌλ‘œ yarn why duplexify ν•˜κ³  λ‚΄ 쒅속성 쀑 ν•˜λ‚˜κ°€μ΄λ₯Ό μ‚¬μš©ν•˜κ³  μžˆμŒμ„ λ°œκ²¬ν–ˆμŠ΅λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ v3.6.0을 μ‚¬μš©ν•˜κ³  μžˆμ—ˆκΈ° λ•Œλ¬Έμ— μ•„λ¬΄λŸ° λ¬Έμ œκ°€ 없을 κ²ƒμž…λ‹ˆλ‹€. 빈 / μ΅œμ†Œ ν”„λ‘œμ νŠΈμ— ν•΄λ‹Ή νŒ¨ν‚€μ§€ / 버전을 μΆ”κ°€ν•˜κ³  yarn λ‹€μ‹œ μ‹€ν–‰ ν•΄ λ³΄μ•˜μŠ΅λ‹ˆλ‹€. μ‹€μ œλ‘œ 잘 μž‘λ™ν–ˆμŠ΅λ‹ˆλ‹€. κ²½κ³ κ°€ μ—†μŠ΅λ‹ˆλ‹€. λ˜ν•œ 좔적에 yarn 와 κ΄€λ ¨λœ μ›ΉνŒ© μŠ€ν¬λ¦½νŠΈκ°€ ν‘œμ‹œλ˜λŠ” μ΄μœ κ°€ μ„€λͺ…λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

λ‚΄κ°€ μ–΄λ–»κ²Œν–ˆλŠ”μ§€ 잘 λͺ¨λ₯΄κ² μ§€λ§Œ, ν•œ λ²ˆμ€ 경고에 λŒ€ν•œ λ‹€λ₯Έ 쀄을 μ°Ύμ•˜κ³  λ™μΌν•œ webpack의 cli.js νŒŒμΌμ„ 가리 켰지 만 λ‚΄λΆ€ μ½”λ“œλŠ” sshpk (# μ΄μ „μ˜ # 175758a).

new Buffer κ°€ yarn의 λ…λ¦½ν˜• JS nightly build 의 μ½”λ“œμ— ν‘œμ‹œλœλ‹€λŠ” 사싀을 κΉ¨λ‹«κ³  λ‚˜μ€‘μ— yarn이 μ—…λ°μ΄νŠΈ 된 ν›„ λ©”μ‹œμ§€κ°€ μ €μ ˆλ‘œ 사라지기λ₯Ό 바라며 κ²°κ΅­ ν¬κΈ°ν–ˆμŠ΅λ‹ˆλ‹€.

@jacobq 쑰사해 μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€! μ €λŠ” 이것에 λŒ€ν•œ μ „λ¬Έκ°€κ°€ μ•„λ‹™λ‹ˆλ‹€. 문자 κ·ΈλŒ€λ‘œμ΄ 문제λ₯Ό μ ‘ν–ˆμŠ΅λ‹ˆλ‹€.ν•˜μ§€λ§Œ μ—¬λŸ¬λΆ„μ˜ λ°œκ²¬μ„ 읽고 λ‹€μ‹œ 읽은 후에 Yarn에 duplexify 의 이전 버전이 ν¬ν•¨λ˜μ–΄ μžˆλ‹€λŠ” 말이 λ“€λ¦½λ‹ˆλ‹€. CLI μ½”λ“œμ—μ„œ? μ •ν™•ν•©λ‹ˆκΉŒ?

μ—¬μ „νžˆ 이것도보고 μžˆμŠ΅λ‹ˆλ‹€.

방금 https://nodejs.org/에 κ°€μ„œ μ΅œμ‹  버전이 이미 10.5μž„μ„ λ°œκ²¬ν–ˆμŠ΅λ‹ˆλ‹€ πŸ‘€
ν•œνŽΈ, 제 λ™λ£Œλ“€κ³Ό μ €λŠ”μ΄ λ¬Έμ œκ°€ 아직 μ—΄λ € 있기 λ•Œλ¬Έμ— 8.xλ₯Ό μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. πŸ˜… 10.x의 μƒˆλ‘œμš΄ κΈ°λŠ₯을 νƒμƒ‰ν•˜κ³  μ‹ΆμŠ΅λ‹ˆλ‹€! πŸš€ πŸ™

@kachkaev 이 κ²½κ³ κ°€ 당신을 λ©ˆμΆ”κ²Œν•˜μ§€ λ§ˆμ‹­μ‹œμ˜€! :λ―Έμ†Œ:

@mcmire 그것은 λ³΄μ΄λŠ” κ·Έ 방법은 λ‚˜μ—κ²Œμžˆλ‹€. 잠금 νŒŒμΌμ„ μƒˆλ‘œ 고치렀면 yarn upgrade ... λ₯Ό μ‹€ν–‰ν•΄μ•Όν•œλ‹€κ³  μƒκ°ν•©λ‹ˆλ‹€.

@kachkaev 8.xλŠ” 올 κ°€μ„κΉŒμ§€ μ—¬μ „νžˆ @teohhanhuiκ°€ μ–ΈκΈ‰ν–ˆλ“―μ΄ 이것은 단지 κ²½κ³  일 λΏμ΄λ―€λ‘œ 좜λ ₯이 일뢀 μ‘μš© ν”„λ‘œκ·Έλž¨ / 둜직과 λ°€μ ‘ν•˜κ²Œ μ—°κ²°λ˜λŠ” 경우λ₯Ό μ œμ™Έν•˜κ³  "깨지지"μ•ŠμŠ΅λ‹ˆλ‹€.

@jacobq μž‘λ™ν•˜λ €λ©΄ λ…Έλ“œ> = 9κ°€ ν•„μš”ν•œ νŒ¨ν‚€μ§€κ°€ 이미 μžˆμŠ΅λ‹ˆλ‹€.

이 κ²½κ³  λ•Œλ¬Έμ— λ…Έλ“œ 8도 μ‚¬μš©ν•˜κ³  μžˆμ—ˆμ§€λ§Œ μ§€κΈˆμ€ 싀을 μ‚¬μš©ν•  λ•Œλ§ˆλ‹€ λ³Ό μˆ˜λ°–μ— μ—†λŠ”λ° 정말 싀망 μŠ€λŸ½μŠ΅λ‹ˆλ‹€. λŒ€μ‹  npm을 μ‚¬μš©ν•˜λŠ” 것에 λŒ€ν•΄ μƒκ°ν•˜κ²Œ λ§Œλ“€μ§€ 만 μ €λŠ” yarn을 많이 μ’‹μ•„ν•˜κ³  λ‹€μ‹œ μ „ν™˜ν•˜κ³  싢지 μ•ŠμŠ΅λ‹ˆλ‹€. 이 κ²½κ³ λ₯Ό 맀일 λ¬΄μ‹œν•˜λ €κ³ ν•˜λŠ” 것은 μŠ¬ν”ˆ μΌμž…λ‹ˆλ‹€. 😒

아직이 λ¬Έμ œμ— λŒ€ν•œ 해결책을 찾은 μ‚¬λžŒμ΄ μžˆμŠ΅λ‹ˆκΉŒ? 원사 λͺ…령을 μ‹€ν–‰ν•  λ•Œλ§ˆλ‹€λ³΄κΈ°κ°€ λ„ˆλ¬΄ μ§œμ¦λ‚˜

+1

원사 μ„€μΉ˜ v1.7.0
info 잠금 파일이 μ—†μŠ΅λ‹ˆλ‹€.
[1/4] νŒ¨ν‚€μ§€ ν•΄κ²° 쀑 ...
⠁ (node ​​: 12916) [DEP0005] DeprecationWarning : Buffer ()λŠ” λ³΄μ•ˆ 및 μ‚¬μš©μ„± 문제둜 인해 더 이상 μ‚¬μš©λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λŒ€μ‹  Buffer.alloc (), Buffer.allocUnsafe () λ˜λŠ” Buffer.from () λ©”μ†Œλ“œλ₯Ό μ‚¬μš©ν•˜μ‹­μ‹œμ˜€.
showFlaggedDeprecation (buffer.js : 159 : 11)
μƒˆ 버퍼 (buffer.js : 174 : 3)
Object.module.exports.module.exports (C : \ Program Files (x86) \ Yarnlib \ cli.js : 4105 : 6)
__webpack_require__ (C : \ Program Files (x86) \ Yarnlib \ cli.js : 22 : 30)
Object.module.exports.module.exports (C : \ Program Files (x86) \ Yarnlib \ cli.js : 4228 : 12)
__webpack_require__ (C : \ Program Files (x86) \ Yarnlib \ cli.js : 22 : 30)
Object.module.exports.module.exports (C : \ Program Files (x86) \ Yarnlib \ cli.js : 56449 : 11)μ—μ„œ
__webpack_require__ (C : \ Program Files (x86) \ Yarnlib \ cli.js : 22 : 30)
κ°œμ²΄μ—μ„œ.(C : \ Program Files (x86) \ Yarnlib \ cli.js : 43234 : 13)

λ‚˜λŠ” λ˜ν•œ λ‚΄ OSXμ—μ„œ μ΄κ²ƒμœΌλ‘œ 고톡 λ°›κ³  μžˆμ—ˆμ§€λ§Œ :

yarn global add yarn

풀릴 것 κ°™μ•˜λŠ”λ° ... ν™ˆ 브루 버전이 왠지 κΉ¨ μ‘Œλ‚˜ ... πŸ€”

@carddamom 정말 λ¬Έμ œκ°€ ν•΄κ²° λ˜μ—ˆμŠ΅λ‹ˆκΉŒ? μ•„λ‹ˆλ©΄ 이미 ν•œ 번 μ‹€ν–‰ν–ˆκΈ° λ•Œλ¬Έμ— λ¬Έμ œκ°€ 사라 μ‘ŒμŠ΅λ‹ˆκΉŒ? (μ €λŠ” μ—¬μ „νžˆ 7/6 밀에 new Buffer 이 134 번 λ‚˜νƒ€λ‚˜λŠ” 것을 λ΄…λ‹ˆλ‹€.) κΆκΈˆν•©λ‹ˆλ‹€. node_modules λ₯Ό μ‚­μ œν•˜κ³  yarn λ‹€μ‹œ μ‹€ν–‰ν•˜λ©΄ κ²½κ³ κ°€ λ‹€μ‹œ ν‘œμ‹œλ©λ‹ˆκΉŒ?

이것은 λ‚˜ μ—κ²Œλ„μ΄ 문제λ₯Ό ν•΄κ²°ν–ˆμŠ΅λ‹ˆλ‹€.

image

Homebrew와 ν•¨κ»˜ μ„€μΉ˜λœ 원사λ₯Ό μ œκ±°ν•˜κ³  npm으둜 μ „μ—­ 적으둜 λ‹€μ‹œ μ„€μΉ˜ν–ˆμŠ΅λ‹ˆλ‹€. 더 이상이 문제λ₯Ό 보지 λͺ»ν–ˆκ³  λ‹€λ₯Έ gyp κ΄€λ ¨ 였λ₯˜λ„ μ‚¬λΌμ‘ŒμŠ΅λ‹ˆλ‹€.

ν™ˆλΈŒλ₯˜ 버전이 왠지 κΉ¨ μ‘ŒλŠ”μ§€ κΆκΈˆν•˜λ„€μš” ... πŸ€”

이제 Homebrewλ₯Ό ν™•μ‹€νžˆ 가리킬 κ²ƒμž…λ‹ˆλ‹€.

@jacobq λ‚΄κ°€ "yarn global"을 μ‚¬μš©ν•˜κ³  μžˆμ—ˆκΈ° λ•Œλ¬Έμ— 제거 ν•  node_modulesκ°€ μ—†μ—ˆμŠ΅λ‹ˆλ‹€.

tar.gz λ¦΄λ¦¬μŠ€μ™€ Homebrew (tar.gz 릴리슀 만 μ„€μΉ˜)μ—μ„œ κ²½κ³  만 ν‘œμ‹œλ˜λŠ” μ΄μœ λŠ” new Buffer λ₯Ό 호좜 ν•œ λͺ¨λ“ˆμ΄ node_modules 디렉토리.

λ”°λΌμ„œ homebrewλ₯Ό 톡해 μ„€μΉ˜ν•  λ•Œ yarn μ‹€ν–‰ νŒŒμΌμ€ λ‹€μŒ μœ„μΉ˜μ— μžˆμŠ΅λ‹ˆλ‹€.

/usr/local/bin/yarn

κ·ΈλŸ¬λ‚˜ npm을 톡해 μ„€μΉ˜ν•  λ•Œ λ‹€μŒκ³Ό 같은 κ²½λ‘œμ—μžˆμ„ κ²ƒμž…λ‹ˆλ‹€ (μ—¬κΈ°μ„œλŠ” nvm을 μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€).

~/.nvm/versions/node/v10.6.0/lib/node_modules/yarn/bin/yarn

μ½”λ“œλŠ” μ •ν™•νžˆ λ™μΌν•˜μ§€λ§Œ npm이 node_modules ν¬ν•¨ν•˜λŠ” 디렉토리에 μ„€μΉ˜ν–ˆκΈ° λ•Œλ¬Έμ— ν˜„μž¬ κ²½κ³ λ₯Ό ν‘œμ‹œν•˜μ§€ μ•ŠλŠ”λ‹€λŠ” 점만 λ‹€λ¦…λ‹ˆλ‹€.

μ°Έμ‘°λ₯Ό μœ„ν•΄ λ„€μ΄ν‹°λΈŒ 버퍼 λͺ¨λ“ˆ λ‚΄λΆ€ isInsideNodeModules λ₯Ό μ°Έμ‘°ν•˜μ„Έμš”.

lib/cli.js μ—¬μ „νžˆ new Buffer λŒ€ν•œ λ§Žμ€ 호좜이 ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. 그것은 λͺ¨λ‘ ν•˜λ‚˜μ˜ 큰 μ›ΉνŒ© λ²ˆλ“€μ΄λ―€λ‘œ μ–΄λ–€ λΌμ΄λΈŒλŸ¬λ¦¬μ—μ„œ μ™”λŠ”μ§€ λͺ¨λ₯΄κ² μ§€λ§Œ μœ„μ˜ 주석은 νŒ¨ν‚€μ§€λ₯Ό 식별 ν•œ 것 κ°™μŠ΅λ‹ˆλ‹€.

예, Debian / Ubuntu μ €μž₯μ†Œ 버전 (μ•„λ§ˆ μœ„μ— λ‚˜μ—΄λœ 이유 λ•Œλ¬ΈμΌ 수 있음)μ—μ„œ μ—¬μ „νžˆ λ°œμƒν•˜κ³  μžˆμŒμ„ ν™•μΈν•˜λŠ” κ²ƒλ§ŒμœΌλ‘œλ„ Homebrewμ—λ§Œ κ΅­ν•œλœ 것은 μ•„λ‹™λ‹ˆλ‹€.

λ‹€μ–‘ν•œ μ’…μ†μ„±μ—μ„œ new Buffer μ‚¬μš©μ„ μ—…λ°μ΄νŠΈν•˜λŠ” 데 μ‹œκ°„μ΄ 걸리면 μ§€κΈˆμ€ νŠΉμ • κ²½κ³ λ₯Ό μΉ¨λ¬΅μ‹œν‚¬ 방법을 μ°ΎλŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€. λ‚΄ μ˜†μ—, μΆ”κ°€ --no-deprecation 에 μ μ ˆν•œ μž₯μ†Œμ—μ„œ ν”Œλž˜κ·Έλ₯Ό /usr/bin/yarn μž‘λ™ν•˜μ§€λ§Œ μ•½κ°„μ˜ ν•΄ν‚€ 무거운 손을 λŠλ‚€λ‹€.

νŽΈμ§‘ : NODE_OPTIONS=--no-deprecation yarn 같은 싀을 μ‹€ν–‰ν•  μˆ˜λ„ μžˆμŠ΅λ‹ˆλ‹€. λ‚˜λŠ” 그것을 λ³„μΉ­μœΌλ‘œ μ„€μ •ν•  것이라고 μƒκ°ν•©λ‹ˆλ‹€.

@jacobq ... λ‹Ήμ‹ μ˜ μ œμ•ˆμ— λŒ€ν•΄, λ‚˜λŠ” λ‚΄ λŒ“κΈ€μ„ μ œκ±°ν•˜κ³  그의 λŒ“κΈ€ 만 λ‚¨κ²ΌμŠ΅λ‹ˆλ‹€. 더 μΆ”κ°€ν•˜μ§€ μ•Šμ„ κ²ƒμž…λ‹ˆλ‹€.
...λλ‚œ...

μž„μ‹œ ν•΄κ²°μ±…μœΌλ‘œ @noinkling이 μ œμ•ˆν•œ 별칭을 μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

fish :

function yarn
  env NODE_OPTIONS=--no-deprecation yarn $argv
end

이것은 2f4bba1 (?)을 ν¬ν•¨ν•˜λŠ” 1.9.2 rcμ—μ„œ μ—¬μ „νžˆ λ°œμƒν•©λ‹ˆλ‹€.

yarn install v1.9.2
[1/5] πŸ”  Validating package.json...
[2/5] πŸ”  Resolving packages...
[3/5] 🚚  Fetching packages...
[----------------------------------------------------------------------] 0/1820
(node:1936) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[4/5] πŸ”—  Linking dependencies...

λ…Έλ“œ 10.6, macOS 10.13.6 μ‚¬μš©.

@vieira 예, μ—¬κΈ° λ‚΄ μ˜κ²¬μ„ μ°Έμ‘°ν•˜μ‹­μ‹œμ˜€. (μΌλΆ€λŠ” PR을 기닀리고 μžˆμœΌλ―€λ‘œ κ·ΈλŸ¬ν•œ λ…Έλ ₯에 κΈ°μ—¬ν•˜κ±°λ‚˜ 적어도 +1 λ°˜μ‘μ„ μ œκ³΅ν•˜μ—¬ 도움을 쀄 수 μžˆμŠ΅λ‹ˆλ‹€).

같은 λ¬Έμ œκ°€
λ…Έλ“œ v10.7.0, μ‹€ 1.9.2

node:67668) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=4 <=9".

@bogdansoare λŠ” ν”„λ‘œμ νŠΈμ—μ„œ ν˜Έν™˜λ˜μ§€ μ•ŠλŠ” λͺ¨λ“ˆμ„ μ‚¬μš©ν•˜κ³ μžˆλŠ” 것 κ°™μŠ΅λ‹ˆλ‹€. yarn why upath λ₯Ό μ‹œλ„ν•œ λ‹€μŒ 였λ₯˜λ₯Ό μ œκ±°ν•˜κΈ° μœ„ν•΄ κ°€μ Έ μ˜€λŠ” 뢀뢄을 제거 / μ—…λ°μ΄νŠΈν•˜μ‹­μ‹œμ˜€.

PS + 1 / λ‚˜λ„ λŒ“κΈ€μ€ 일반적으둜 λˆˆμ‚΄μ„ μ°Œν‘Έλ¦½λ‹ˆλ‹€. λŒ€μ‹  λ°˜μ‘ λ²„νŠΌμ„ μ‚¬μš©ν•˜μ„Έμš”.

@jacobq 이 GitHub λ¬Έμ œλŠ” μ’…κ²°λ˜μ—ˆμ§€λ§Œ μ΅œμ‹  1.9.2 λ¦΄λ¦¬μŠ€μ—μ„œ μ—¬μ „νžˆ λ¬Έμ œκ°€ λ‚˜νƒ€λ‚©λ‹ˆλ‹€. 이 λ¬Έμ œκ°€ λ‹€μš΄ 슀트림 μ’…μ†μ„±μœΌλ‘œ 인해 λ°œμƒν•œλ‹€λŠ” 것을 μ•Œκ³  μžˆμ§€λ§Œ Yarn νŒ€μ΄μ΄ λ¬Έμ œκ°€ ν•΄κ²°λ˜μ—ˆλ‹€κ³  μƒκ°ν•˜λŠ”μ§€ μ—¬λΆ€λŠ” λͺ…ν™•ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 이 문제λ₯Ό ν•΄κ²°ν•΄μ•Όν•©λ‹ˆκΉŒ? μ•„λ‹ˆλ©΄ 해결책이 κ²½κ³ λ₯Ό λΉ„ν™œμ„±ν™”ν•˜λŠ” 것이기 λ•Œλ¬Έμ— λ‹«ν˜€ μžˆμŠ΅λ‹ˆκΉŒ? 우리 νŒ€μ˜ λ§₯λ½μ—μ„œ λ³΄μ•ˆ κ²½κ³ λ₯Ό λΉ„ν™œμ„±ν™”ν•˜λŠ” 것은 μš©λ‚© 될 수 μ—†κΈ° λ•Œλ¬Έμ— κ²½κ³ λ₯Ό μ–΅μ œν•˜λŠ” 것은 λ‚˜μ™€ 우리 νŒ€μ— λŒ€ν•œ 해결책이 μ•„λ‹™λ‹ˆλ‹€.

@corshamax 이 νŠΉμ • λ¬Έμ œλŠ” λ¬Έμ œκ°€μžˆλŠ” ꡬ쑰의 μ‚¬μš©μ„ μ€‘μ§€ν•˜λ„λ‘ μ½”λ“œλ₯Ό μ—…λ°μ΄νŠΈν–ˆκΈ° λ•Œλ¬Έμ— ν•΄κ²°λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 일뢀 쒅속성이 μ—¬μ „νžˆ μ‚¬μš© 쀑이기 λ•Œλ¬Έμ— κ²½κ³ κ°€ 계속 ν‘œμ‹œλ˜μ§€λ§Œ, μ΄λŠ” κ΄€λ ¨ ν”„λ‘œμ νŠΈμ—λ³΄κ³ ν•΄μ•Όν•˜λŠ” λ‹€λ₯Έ 문제 (μ•ˆνƒ€κΉκ²Œλ„ λ™μΌν•œ κ²°κ³Ό)μž…λ‹ˆλ‹€. 그런 λ‹€μŒ μˆ˜μ • 된 λ¦΄λ¦¬μŠ€κ°€ λ§Œλ“€μ–΄μ§€λ©΄ 영ν–₯μ„λ°›λŠ” 쒅속성 μ—…κ·Έλ ˆμ΄λ“œ).

그리고 λͺ¨λ“  것에 κ΄€ν•΄μ„œλŠ”, μš°λ¦¬λŠ” ν’€ λ¦¬ν€˜μŠ€νŠΈλ₯Ό ν™˜μ˜ν•©λ‹ˆλ‹€. κ·Έλž˜μ„œ 당신이 무언가λ₯Ό κ³ μΉ  수 μžˆλ‹€λŠ” 것을 μ•Œκ²Œλœλ‹€λ©΄, ν•˜λ‚˜λ₯Ό μ—΄μ–΄μ„œ λ‹€μŒ 릴리즈λ₯Ό μœ„ν•΄ 그것을 병합 ν•  κ²ƒμž…λ‹ˆλ‹€. @jacobq λŠ” μ—…λ°μ΄νŠΈκ°€ ν•„μš”ν•  μˆ˜μžˆλŠ” 쒅속성을 λ‚˜μ—΄ν•˜μ—¬ 멋진 μž‘μ—…μ„ μˆ˜ν–‰ν–ˆμŠ΅λ‹ˆλ‹€. https://github.com/yarnpkg/yarn/pull/5934#issuecomment -406346724

λ…Έλ“œ v10.8.0 및 yarn v1.9.4μ—μ„œμ΄ λ¬Έμ œκ°€ λ°œμƒν•©λ‹ˆλ‹€.

https://github.com/yarnpkg/yarn/pull/5934#issuecomment -406346724에 μ–ΈκΈ‰ 된 λͺ¨λ“  PR이 병합 된 것 κ°™μŠ΅λ‹ˆλ‹€. 곧이 문제λ₯Ό ν•΄κ²°ν•  수 있기λ₯Ό λ°”λžλ‹ˆλ‹€.

@vrobinson 예, https://github.com/yarnpkg/yarn/pull/6208에 μ˜ν•΄ μˆ˜μ •λ˜μ–΄μ•Όν•©λ‹ˆλ‹€. λ…λ¦½ν˜• JS μ—μ„œ new Buffer ν•˜κ³  λŒ€μ²΄μ—λ§Œ λ‚˜νƒ€λ‚˜λŠ”μ§€ κ΄€μ°°ν•˜λ©΄ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€. 및 의견. 인내심을 가지고 : smile_cat :

μ—…λ°μ΄νŠΈ : 방금 μ°©λ₯™ ν•œ 것 κ°™μŠ΅λ‹ˆλ‹€ : tada : κ·ΈλŸ¬λ‹ˆ λ‹€μŒλ‚  밀을 μ§€μΌœλ³΄μ„Έμš”. 이 일을 도와 μ£Όμ‹  λͺ¨λ“  λΆ„λ“€κ»˜ : bowing_man : κ°μ‚¬ν•©λ‹ˆλ‹€ : pray :!

이 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. ν•΄κ²° λ˜μ—ˆμŠ΅λ‹ˆκΉŒ?

@ rof20004 : point_up : (λŒ“κΈ€ λ°”λ‘œ μœ„) . PR이 λ³‘ν•©λ˜μ—ˆμœΌλ―€λ‘œ 이제 μ†ŒμŠ€ μ½”λ“œμ˜ master λΆ„κΈ°μ—μ„œ "κ³ μ •"λ©λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ (1) μƒˆ 버전이 μΆœμ‹œλ˜κ³  (2) ν•΄λ‹Ή λ²„μ „μœΌλ‘œ μ—…κ·Έλ ˆμ΄λ“œ ν•  λ•ŒκΉŒμ§€ λ…Έλ“œ 10μ—μ„œμ΄ κ²½κ³ κ°€ 계속 ν‘œμ‹œλ©λ‹ˆλ‹€.

@jacobq λ°λΉ„μ•ˆ νŒ¨ν‚€μ§€λ₯Ό μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. μƒˆ νŒ¨ν‚€μ§€κ°€ λ‚˜μ˜¬ λ•ŒκΉŒμ§€ κΈ°λ‹€λ¦° λ‹€μŒ '-'λ₯Ό κΈ°λ‹€λ €μ•Όν•©λ‹ˆλ‹€.

감사 :)

@ rof20004 μ›ν•˜λŠ” 경우 내일 μ‚¬μš©ν•  수 μžˆμ–΄μ•Όν•©λ‹ˆλ‹€. apt κ°€ 야간을 κ°€λ¦¬ν‚€λŠ” 지 ν™•μΈν•˜μ‹­μ‹œμ˜€.
https://yarnpkg.com/en/docs/install#debian -nightly

@jacobq κ·Έλž˜μ„œ μš°λ¦¬λŠ”μ΄ λ§ˆμ§€λ§‰ λ¬Έμ œκ°€ [email protected]둜 λ§ˆμΉ¨λ‚΄ ν•œ 번 ν•΄κ²°λ˜λŠ” 것을 λ³Ό κ²ƒμž…λ‹ˆλ‹€. λ§žμŠ΅λ‹ˆκΉŒ?

μ•„λ§ˆλ„ 1.10κ³Ό 같은 패치 λ¦΄λ¦¬μŠ€κ°€ 아닐 κ²ƒμž…λ‹ˆλ‹€.

λ‚˜λŠ” 같은 문제λ₯Ό κ°€μ§€κ³ μžˆλ‹€.
$ yarn install
node:39) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. error An unexpected error occurred: "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz: getaddrinfo EADDRNOTAVAIL registry.yarnpkg.com registry.yarnpkg.com:443". info If you think this is a bug, please open a bug report with the information provided in "/app/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
/app $ node -v v10.10.0 /app $ yarn -v 1.9.4 /app $

λˆ„κ΅°κ°€κ°€ 해결책을 가지고 μžˆμŠ΅λ‹ˆκΉŒ?

@ codestart123 은 μŠ€λ ˆλ“œλ₯Ό μ½μ—ˆμœΌλ©° 야간에 μˆ˜μ •λ˜μ—ˆμ§€λ§Œ 아직 μΆœμ‹œλ˜μ§€ μ•Šμ•˜λ‹€κ³  λ§ν–ˆμŠ΅λ‹ˆλ‹€.

@ codestart123 μ–ΈκΈ‰ν•˜μ‹  였λ₯˜λŠ”이 문제둜 μΈν•œ 것이 μ•„λ‹™λ‹ˆλ‹€ (지원 쀑단 κ²½κ³ λŠ” λ¬΄μ‹œν•΄λ„λ©λ‹ˆλ‹€).

error An unexpected error occurred: "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz: getaddrinfo EADDRNOTAVAIL registry.yarnpkg.com registry.yarnpkg.com:443"

EADDRNOTAVAIL 은 λ„€νŠΈμ›Œν¬ κ΄€λ ¨ 였λ₯˜μž…λ‹ˆλ‹€ (였λ₯˜ : μ£Όμ†Œλ₯Ό μ‚¬μš©ν•  수 μ—†μŒ). ping registry.yarnpkg.com λ₯Ό μ‹€ν–‰ν•˜μ—¬ μ‹œμŠ€ν…œμ΄ 이름을 ν™•μΈν•˜κ³  ν˜ΈμŠ€νŠΈμ— μ—°κ²°ν•  수 μžˆλŠ”μ§€ ν™•μΈν•˜μ‹­μ‹œμ˜€.

아직 μˆ˜μ • λ˜μ—ˆμŠ΅λ‹ˆκΉŒ?

@ ryanzhu1024 1.10.0μ—μ„œ μˆ˜μ •λ˜μ—ˆμœΌλ©° λ©°μΉ  전에 μΆœμ‹œλ˜μ—ˆμŠ΅λ‹ˆλ‹€ πŸ‘

λ…Έλ“œ μ—…κ·Έλ ˆμ΄λ“œ μ–€ 버전을 κΈ°λ‹€λ¦¬λŠ” μ€‘μž…λ‹ˆλ‹€.

이 μ„±κ°€μ‹  κ²½κ³ κ°€ λ§ˆμΉ¨λ‚΄ 사라 μ‘Œλ‹€λŠ” 것을 믿을 수 μ—†μŠ΅λ‹ˆλ‹€. κ°μ‚¬ν•©λ‹ˆλ‹€ :)

πŸŽ‰ 🍾 후라 μ•„μ•„μ•„ πŸ™Œ πŸŽ‰ 🍾

λ‚΄κ°€ 여기에 μ–΄λ–€ 아이디어가 λΉ„μŠ·ν•œ 문제λ₯Ό 가지고 : https://stackoverflow.com/questions/53201124/how-to-find-source-of-a-problem-inside-a-npm-package-node36378-dep0005-dep

@goktugyil 링크 ν•œ μ§ˆλ¬Έμ— yarn λŒ€ν•œ 언급이 μ—†μŠ΅λ‹ˆλ‹€. yarn을 μ‚¬μš©ν•˜λŠ” 경우 μ΅œμ‹  버전 (ν˜„μž¬ 1.12.3 )을 μ‚¬μš©ν•˜κ³  μžˆλŠ”μ§€ ν™•μΈν•˜μ‹­μ‹œμ˜€. yarn ν•˜μ§€ μ•ŠλŠ” 경우 여기에 ꡐ차 κ²Œμ‹œν•˜μ§€ λ§ˆμ‹­μ‹œμ˜€. StackOverflowλŠ” 일반적인 ν”„λ‘œκ·Έλž˜λ° μ§ˆλ¬Έμ„ν•˜κΈ°μ— 쒋은 곳이고 https://github.com/nodejs/help λŠ” λ…Έλ“œ μ§ˆλ¬Έμ„ν•˜κΈ°μ— 쒋은 κ³³μž…λ‹ˆλ‹€. https://github.com/yarnpkg/yarn/issues λŠ” μ‹€κ³Ό κ΄€λ ¨λœ κΈ°λŠ₯ μš”μ²­ 및 문제λ₯Όμœ„ν•œ κ²ƒμž…λ‹ˆλ‹€ (일반적인 개발 지원 / 질문이 μ•„λ‹˜).

@arcanis / @BYK / @imsnif 이 μŠ€λ ˆλ“œλ₯Ό

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰