Yarn: `yarn install --production`이 μ˜¬λ°”λ₯Έ 쒅속성을 μ„€μΉ˜ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

에 λ§Œλ“  2016λ…„ 10μ›” 12일  Β·  115μ½”λ©˜νŠΈ  Β·  좜처: yarnpkg/yarn

μ‹€ν–‰ν•˜λŠ” 경우 yarn install --production 이 ν•„μš”ν•œ 쒅속성을 μ„€μΉ˜ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€ forever . 이것은 nodemon 에 devDependencies nodemon κ°€μžˆλŠ” 것과 κ΄€λ ¨μ΄μžˆλŠ” 것 κ°™μŠ΅λ‹ˆλ‹€.

였λ₯˜ 응닡 :

> forever app.js
module.js:457
    throw err;
    ^
Error: Cannot find module 'minimatch'

여기에 ν…ŒμŠ€νŠΈ μ‘μš© ν”„λ‘œκ·Έλž¨μ„ λ§Œλ“€μ—ˆμŠ΅λ‹ˆλ‹€.
https://github.com/donovan-graham/yarn-example-app

#  Steps to reproduce error
git clone https://github.com/donovan-graham/yarn-example-app.git
cd yarn-example-app
yarn install --production
npm start

#  temporary step to bypass error
rm -rf node_modules
yarn remove nodemon
yarn install --production
npm start
cat-bug

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

μ•ˆλ…•ν•˜μ„Έμš” μ—¬λŸ¬λΆ„,이 λ¬Έμ œκ°€ κ½€ μ˜€λž«λ™μ•ˆ λ°œμƒν•΄μ„œ μ£„μ†‘ν•©λ‹ˆλ‹€.
이 문제λ₯Ό λ‚˜ μžμ‹ μ—κ²Œ ν• λ‹Ήν•˜κ³  μ΄μ œλŠ” μš°μ„  μˆœμœ„κ°€ λ†’μœΌλ―€λ‘œ 휴일 λ™μ•ˆ ν•΄κ²°ν•˜λ €κ³  λ…Έλ ₯ν•  κ²ƒμž…λ‹ˆλ‹€.
격리 된 λΈŒλ ˆμ΄ν‚Ή ν…ŒμŠ€νŠΈ λ˜λŠ” μˆ˜μ • (μ΄μƒμ μœΌλ‘œ)μ΄μžˆλŠ” 도움말 및 ν™λ³΄λŠ” 맀우 ν™˜μ˜ν•©λ‹ˆλ‹€.

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

@ Daniel15 λ‚˜λŠ” 이것이 nodemon이 μ΅œμ‹  λ²„μ „μ˜ minimatchλ₯Ό 가지고 있기 λ•Œλ¬Έμ΄λΌκ³  μƒκ°ν•©λ‹ˆλ‹€.

링컀 ν•¨μˆ˜λŠ” ν˜„μž¬ deps와 dev depsλ₯Ό λͺ¨λ‘ κ°€μ Έμ˜΅λ‹ˆλ‹€. 인수 μƒμ‚°μ˜ 경우이λ₯Ό λ°©μ§€ν•΄μ•Όν•©λ‹ˆλ‹€.

정상적인 μ‹€ μ„€μΉ˜μ—μ„œλ„ 생산 μΈμˆ˜κ°€ μ—†μŠ΅λ‹ˆλ‹€. μ‹€μ œ κ²½λ‘œμ—λŠ” μ΅œμ‹  버전 만 μ„€μΉ˜λ©λ‹ˆλ‹€. 이것도 ν™•μΈν•΄μ•Όν•©λ‹ˆλ‹€.

yarn install --production λ₯Ό μ‹€ν–‰ ν•œ λ‹€μŒ webpack μ‚¬μš©ν•˜μ—¬ λΉŒλ“œλ₯Ό μ‹€ν–‰ν•˜λ €κ³  ν•  λ•Œ λΉ„μŠ·ν•œ λ¬Έμ œκ°€ λ°œμƒν•©λ‹ˆλ‹€ ( yarn install μ‹€ν–‰ν•˜λ©΄ 잘 μž‘λ™ν•©λ‹ˆλ‹€).

> NODE_ENV=production webpack -p --config webpack/production.config.js

module.js:457
    throw err;
    ^

Error: Cannot find module 'graceful-fs'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)

μ˜¬λ°”λ₯΄κ²Œ κΈ°μ–΅ν•˜λ©΄ 이전 μ‹œλ„μ—μ„œ λ‹€λ₯Έ νŒ¨ν‚€μ§€ ( graceful-fs 뿐만 μ•„λ‹ˆλΌ)와 μœ μ‚¬ν•œ 였λ₯˜κ°€ ν‘œμ‹œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.

저도 맀우 λΉ„μŠ·ν•΄μ§‘λ‹ˆλ‹€ ... yarn install 잘 μž‘λ™ν•©λ‹ˆλ‹€. ν•˜μ§€λ§Œ --production ν”Œλž˜κ·Έλ₯Ό μ‚¬μš©ν•˜λ©΄ λ‹€μŒκ³Ό 같이 ν‘œμ‹œλ©λ‹ˆλ‹€.

> yarn install --production

yarn install v0.15.1
error npm-shrinkwrap.json found. This will not be updated or respected. See [TODO] for more information.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The engine "rhino" appears to be invalid.
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
warning [email protected]: The engine "rhino" appears to be invalid.
warning [email protected]: The engine "rhino" appears to be invalid.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⠐ node-sass:     at Module.require (module.js:367:17)
[-/1] ⠐ waiting...
[-/1] ⠐ waiting...
[-/1] ⠐ waiting...
error C:\vagrant\ebroker-quoteengine\node_modules\node-sass: Command failed.
Exit code: 1
Command: C:\WINDOWS\system32\cmd.exe
Arguments: /d /s /c node scripts/install.js
Directory: C:\vagrant\ebroker-quoteengine\node_modules\node-sass
Output:
module.js:341
    throw err;
    ^

Error: Cannot find module 'tough-cookie'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (C:\vagrant\ebroker-quoteengine\node_modules\node-sass\node_modules\request\lib\cookies.js:3:13)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at SpawnError (C:\Users\nathan.white\AppData\Roaming\npm\node_modules\yarnpkg\lib\errors.js:18:1)
    at ChildProcess.<anonymous> (C:\Users\nathan.white\AppData\Roaming\npm\node_modules\yarnpkg\lib\util\child.js:107:15)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:827:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:90:13)
    at Socket.emit (events.js:182:7)
    at Pipe._onclose (net.js:471:12)

λ‹€μŒκ³Ό μœ μ‚¬ν•œ 문제λ₯Ό μž¬ν˜„ ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

npm init --yes
yarn add --dev nodemon
yarn add gulp
rm -rf node_modules
yarn install --production

그러면 is-glob κ°€ μ„€μΉ˜λ˜μ§€λ§Œ ν•΄λ‹Ή 쒅속성은 μ„€μΉ˜λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. is-extglob :

> yarn why is-glob
yarn why v0.16.0
# ...
info Reasons this module exists
   - "nodemon#chokidar" depends on it
   - "gulp#liftoff#findup-sync" depends on it

> yarn why is-extglob
yarn why v0.16.0
#  ...
info This module exists because "nodemon#chokidar#is-glob" depends on it.

μˆœνšŒν•˜λŠ” λ™μ•ˆ gulp#liftoff 쒅속성 경둜λ₯Ό "μžŠλŠ”"것 κ°™μŠ΅λ‹ˆλ‹€ ..?

νŽΈμ§‘ : 더 μž‘μ€ 예 :

npm init --yes
yarn add --dev [email protected]
yarn add [email protected]
rm -rf node_modules
yarn --prod
node -e "require('is-glob')"

λ˜ν•œ 제거 확인 devDependencies μ‹€ν–‰ν•˜κΈ° 전에 yarn --prod μ˜¬λ°”λ₯Έ 쒅속성 트리λ₯Ό μ„€μΉ˜ν•©λ‹ˆλ‹€.

λ‚΄ μ†Œν”„νŠΈμ›¨μ–΄ νŒ€μ€ 특히 less 및 pouchdb λͺ¨λ‘μ˜ 쒅속성 인 prr νŒ¨ν‚€μ§€μ—μ„œμ΄ λ¬Έμ œμ— μ§λ©΄ν–ˆμŠ΅λ‹ˆλ‹€. --production λΉŒλ“œμ—μ„œ λ‹€λ₯Έ λ§Žμ€ νŒ¨ν‚€μ§€λ„ λˆ„λ½λ˜μ—ˆμ§€λ§Œ prr κ°€ 처음으둜 μ œν’ˆμ—μ„œ 였λ₯˜λ₯Ό μΌμœΌμΌ°μŠ΅λ‹ˆλ‹€. 이 λ¬Έμ œλŠ” μš°λ¦¬κ°€ dev νŒ¨ν‚€μ§€λ₯Ό ν¬ν•¨ν•˜λ©΄ μ„€μΉ˜ ν”„λ‘œκ·Έλž¨μ˜ 크기가 크게 증가 ν•  κ²ƒμ΄λ―€λ‘œ μš°λ¦¬μ—κ²Œ κ°€μž₯ 큰 λ¬Έμ œμ˜€μŠ΅λ‹ˆλ‹€. κ·Έλž˜μ„œ npm을 λ‹€μ‹œ μ‚¬μš©ν–ˆμŠ΅λ‹ˆλ‹€.

FWIW : ν”„λ‘œλ•μ…˜μ—μ„œ yarn 을 (λ₯Ό) μ‹€ν–‰ν•˜κΈ° 전에 package.jsonμ—μ„œ devDependencies μ„Ήμ…˜μ„ μ‚­μ œν•˜μ—¬ 문제λ₯Ό ν•΄κ²°ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

@gihrig κ°€ npm prune --production μ‹€ν–‰ν•˜λ©΄μ΄ 문제λ₯Ό ν•΄κ²°ν•˜λŠ” 데 λ„μ›€μ΄λ˜λŠ” devDependenciesλ₯Ό 제거 ν•  수 μžˆλ‹€κ³  λ§ν–ˆμŠ΅λ‹ˆλ‹€.

@gihrigκ°€ λ§ν–ˆλ“―μ΄ npm prune --production을 μ‹€ν–‰ν•˜λ©΄μ΄ 문제λ₯Ό ν•΄κ²°ν•˜λŠ” 데 λ„μ›€μ΄λ˜λŠ” devDependenciesλ₯Ό 제거 ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

npm에 λΉ„ν•΄ Yarn의 μ£Όμš” 이점은 κ²°μ • 둠적 node_modules dir 즉, 개발, CI 및 ν”„λ‘œλ•μ…˜μ—μ„œ μ¦‰μ‹œ μ‚¬μš©ν•  수 μžˆλ‹€λŠ” κ²ƒμž…λ‹ˆλ‹€. npm prune --production μ‹€ν–‰ν•˜λ©΄ λ™μΌν•œ λ™μž‘μ΄ λ°œμƒν•©λ‹ˆκΉŒ?

ν˜„μž¬ ν•΄κ²° 방법은 ν”„λ‘œλ•μ…˜ ν™˜κ²½μ—μ„œλ„ devDependencies 만 μ„€μΉ˜ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€. λ””μŠ€ν¬λŠ” μ €λ ΄ν•˜κ³  (특히 AWSμ—μ„œ) 결정적 μ„€μΉ˜κ°€ λ””μŠ€ν¬ 곡간보닀 훨씬 더 μ€‘μš”ν•©λ‹ˆλ‹€. κ·Έλž˜μ„œ λ‚΄ "ν•΄κ²° 방법"은 yarn --production does not exist right now처럼 ν–‰λ™ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€.

@tanx npm prune --production κ·Έλƒ₯ devDependenciesλ₯Ό μ œκ±°ν•˜μ‹­μ‹œμ˜€. 그리고 λ‚΄ ν…ŒμŠ€νŠΈμ—μ„œλŠ” 항상 λ™μΌν•œ λͺ¨λ“ˆμ΄ μ œκ±°λ˜μ—ˆμŠ΅λ‹ˆλ‹€. λ°˜λ©΄μ— λ””μŠ€ν¬ 곡간은 μ €λ ΄ν•˜λ―€λ‘œ yarn --production κ°€ μ’…λ£Œλ˜μ§€ μ•ŠλŠ” κ²ƒμ²˜λŸΌ ν–‰λ™ν•˜λŠ” 것이 더 λ‚˜μ€ ν•΄κ²° λ°©λ²•μž…λ‹ˆλ‹€. :)

@tanx npm prune --production은 devDependenciesλ₯Ό μ œκ±°ν•©λ‹ˆλ‹€. 그리고 λ‚΄ ν…ŒμŠ€νŠΈμ—μ„œλŠ” 항상 λ™μΌν•œ λͺ¨λ“ˆμ΄ μ œκ±°λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

이것이 Yarn λΈ”λ‘œκ·Έ κ²Œμ‹œλ¬Όμ— μ„€λͺ… 된 "λ‚΄ μ»΄ν“¨ν„°μ—μ„œ μž‘λ™ν•˜λŠ”"사고 λ°©μ‹μž…λ‹ˆλ‹€. λ¬Έμ œλŠ” npm이 yarn.lock νŒŒμΌμ„ 톡해 yarn의 무결성 검사없이 node_modules 의 μƒνƒœλ₯Ό λ³€κ²½ν•˜λ„λ‘ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€.

λ°”λΌκ±΄λŒ€ λ…Όμ˜ 된 ν•΄κ²° 방법은 개발 λŒ€ 생산 λΆ€μ„œλ₯Ό μ‘΄μ€‘ν•˜λŠ” μ‹€ μ—…λ°μ΄νŠΈλ₯Ό 톡해 곧 λ¬Έμ œκ°€ 될 κ²ƒμž…λ‹ˆλ‹€. κ·Έ λ™μ•ˆ μ‹€μ œλ‘œ "npm prune"ν›„ 처리 해킹에 λŒ€ν•΄ μ‹ μŒ ν•  것이 λ§ŽμŠ΅λ‹ˆλ‹€.

μœ„μ—μ„œ μ„€λͺ…ν•œ yarn why 것은 λ¬΄κ΄€ν•©λ‹ˆλ‹€. why μ½”λ“œκ°€ νŒ¨ν‚€μ§€λ₯Ό κ²€μƒ‰ν•˜λŠ” λ°©λ²•μ˜ λΆ€μž‘μš© μΌλΏμž…λ‹ˆλ‹€.

κ·Έλž˜ν”„λ₯Ό ν•œ 번 κ±Έμ–΄ κ°„ ν›„ κ°€μ‹œμ„±μ„ μ „νŒŒν•˜κΈ° μœ„ν•΄ μΆ”κ°€ 패슀λ₯Ό μΆ”κ°€ν•˜μ§€ μ•Šκ³ μ΄ μž‘μ—…μ„ μˆ˜ν–‰ν•˜λŠ” 쒋은 방법을 μ°ΎμœΌλ €κ³ ν–ˆμŠ΅λ‹ˆλ‹€. κ°€μ‹œμ„±μ„ λ³„λ„μ˜ λ‹¨κ³„λ‘œ λ‚˜λˆ„λŠ” 것이 ν—ˆμš©λ˜λŠ”μ§€ ν™•μ‹€ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€ ..?

λͺ‡ 가지 ν₯미둜운 κ²½μš°λ„ μžˆμ§€λ§Œ κ°€μ‹œμ„±μ„ μ œλŒ€λ‘œ ν•΄κ²°ν•˜λŠ” κ²ƒλ§Œμ΄ μ•„λ‹™λ‹ˆλ‹€.

  • AλŠ” ν”„λ‘œλ•μ…˜ μ’…μ†μ„±μ˜ 선택적 μ’…μ†μ„±μž…λ‹ˆλ‹€.
  • BλŠ” 개발 μ’…μ†μ„±μ˜ λΉ„ 선택적 μ’…μ†μ„±μž…λ‹ˆλ‹€.
  • CλŠ” λ‘˜ λ‹€μ˜ 선택적 쒅속성이 μ•„λ‹™λ‹ˆλ‹€.

이 경우 C의 선택적 ν”Œλž˜κ·ΈλŠ” dev λŒ€ prod에 따라 λ‹€λ¦…λ‹ˆλ‹€. devμ—μ„œλŠ” 선택 사항이 μ•„λ‹ˆλ©° prodμ—μ„œλŠ” 선택 μ‚¬ν•­μž…λ‹ˆλ‹€. λΆ€λͺ¨ 쀑 ν•˜λ‚˜μ—μ„œ 선택적 ν”Œλž˜κ·Έλ₯Ό μƒμ†ν•˜κ±°λ‚˜ 항상 prod λΆ€λͺ¨μ—μ„œ μƒμ†ν•˜λŠ” κ²ƒλ§ŒμœΌλ‘œλ„ 이상 ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

이것은 μ—¬μ „νžˆ ​​0.17.2μ—μ„œ μˆ˜μ •λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€ 😒

μž¬ν˜„ : https://gist.github.com/SimenB/2b179f3b6bca73ba824e1273ea38aed3

yarn

node index.js # works

yarn --prod

node index.js # explodes

/ cc @jkrems

0.17.2 (HearthSim / Joust # 169)μ—μ„œλ„ μˆ˜μ •λ˜μ§€ μ•Šμ€ 것 κ°™μŠ΅λ‹ˆλ‹€.

@SimenB 의 μ§€μ‹œμ— 따라 μ‰½κ²Œ μž¬ν˜„ ν•  수 μžˆμœΌλ―€λ‘œ λ‹€μ‹œ μ—΄μ–΄

@wyze λ¬Έμ œλŠ” 정리가 μ•„λ‹Œ μ„€μΉ˜ 자체 일 수 μžˆμŠ΅λ‹ˆλ‹€.

rm -rf node_modules/ && yarn && npm prune --production && node index.js κ°€ λ™μΌν•œ 였λ₯˜λ‘œ μ‹€νŒ¨ν•©λ‹ˆλ‹€.

rm -rf node_modules/ && npm i && npm prune --production && node index.js λŠ” μž‘λ™ν•©λ‹ˆλ‹€.

λ‚˜λŠ” yarnκ³Ό npm이 λ™μ‹œμ— μ‚¬μš©λ˜λŠ” 것은 μ•„λ‹ˆλΌκ³  μƒκ°ν•˜λ―€λ‘œ λ™μΌν•œ 였λ₯˜κ°€ λ°œμƒν•˜λŠ” μš°μ—°μ˜ 일치 일 수 μžˆμŠ΅λ‹ˆλ‹€.

npm i 와 yarn node_modules 뒀에 npm i ν•˜λ©΄ yarn이 "_requiredBy" 좜λ ₯ν•˜μ§€ μ•ŠλŠ”λ‹€λŠ” 것을 λ³΄μ—¬μ€λ‹ˆλ‹€. npm prune κ°€ yarn install 뒀에 μ—‰λ§μ΄λ˜λŠ” 이유

μ—¬κΈ°μ—μ„œ λ™μΌν•œ 문제, μš°λ¦¬λŠ” dockerμ—μ„œ ν”„λ‘œλ•μ…˜ λΉŒλ“œλ₯Ό ν…ŒμŠ€νŠΈν•˜κ³  μžˆμ—ˆκ³  yarn --production μ—μ„œ μƒμœ„ λͺ¨λ“ˆ send (μ΅μŠ€ν”„λ ˆμŠ€μ—μ„œ μ‚¬μš©λ¨)이 μ„€μΉ˜ λ˜μ—ˆλ”λΌλ„ νŒ¨ν‚€μ§€ mime κ°€ λˆ„λ½λ˜μ—ˆμŒμ„ λ°œκ²¬ν–ˆμŠ΅λ‹ˆλ‹€. .

μ˜ˆμΈ‘ν•  μˆ˜μ—†λŠ” λΉŒλ“œκ°€ λ°œμƒν•˜κΈ° λ•Œλ¬Έμ—μ΄ λ¬Έμ œλŠ” μ΅œλŒ€ν•œ μš°μ„ μ μœΌλ‘œ μ²˜λ¦¬ν•΄μ•Όν•œλ‹€κ³  μƒκ°ν•©λ‹ˆλ‹€.

ν•΄κ²° λ°©λ²•μœΌλ‘œ λΉŒλ“œ 슀크립트의 package.jsonμ—μ„œ devDependencies μ„Ήμ…˜μ„ μ œκ±°ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€.

$ jq 'del(.devDependencies)' package.json > tmp.json && mv tmp.json package.json

@ dy-dx 쑰언에 따라 Docker에 λŒ€ν•œ μ‚¬μš©μž 지정 μ§„μž… 점을 μž‘μ„±ν•˜μ—¬ 개발 쀑에이 문제λ₯Ό ν•΄κ²°ν–ˆμŠ΅λ‹ˆλ‹€.

λ¨Όμ € Dockerfile에 jqλ₯Ό μ„€μΉ˜ν•˜κ³  μ–΄λ”˜κ°€μ— λ‹€μŒ 쀄을 μΆ”κ°€ν•΄μ•Όν•©λ‹ˆλ‹€.

RUN apt-get update && \
    apt-get install -y jq

그런 λ‹€μŒμ΄ 슀크립트λ₯Ό μ–΄λ”˜κ°€μ— μΆ”κ°€ν•˜κ³  Dockerfile [ENTRYPOINT] λ˜λŠ” docker-compose entrypoint entrypoint.sh둜 μ‚¬μš©ν•©λ‹ˆλ‹€.

μ„ ν˜Έν•˜λŠ” λͺ…령을 μ‚¬μš©ν•˜μ—¬ Dockerfile [CMD] λ˜λŠ” docker-compose command 예 : npm start

λ™μΌν•œ 슀크립트λ₯Ό CIμ—μ„œ 일뢀 νŽΈμ§‘ν•˜μ—¬ 이미지λ₯Ό λΉŒλ“œν•˜λŠ” 데 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

@SimenB entries-test νŒ¨ν‚€μ§€μ—μ„œ node_modules 을 μ œκ±°ν•˜κ³  μ‹œλ„ν•΄ μ£Όμ‹œκ² μŠ΅λ‹ˆκΉŒ?

https://registry.yarnpkg.com/entries-test/-/entries-test-1.0.1.tgz#1bf192e414ceadd0cf4b77b3969df32de2985d50

v1.0.1 tar ball을 μΆ”μΆœν•˜λ©΄ define-properties 및 기타 λͺ¨λ“ˆμ΄μžˆλŠ” node_modules 폴더가 μžˆμŠ΅λ‹ˆλ‹€. 그리고 κ·Έλ“€ 쀑 λˆ„κ΅¬λ„ *.js 파일이 μ—†μŠ΅λ‹ˆλ‹€.

@torifat ν—ˆ, node_modules μ‚¬μš©ν•˜μ§€ μ•Šκ³  bundledDependencies ...
κΉ¨λ—ν•œ 것을 ν‘Έμ‹œν•˜λ €κ³  ν•  κ²ƒμž…λ‹ˆλ‹€ (ν”„λ‘œμ νŠΈλ₯Ό μ‚­μ œ ν–ˆμœΌλ―€λ‘œ λ‹€μ‹œ λ§Œλ“€μ–΄μ•Ό 함).

@torifat 그것이 λ³΄μ΄λŠ” μ‹€μ˜ 잘λͺ»μž…λ‹ˆλ‹€.

$ mkdir some-dir && cd some-dir && yarn init -y && yarn add object.entries && yarn pack && tar -ztvf some-dir-v1.0.0.tgz
drwxr-xr-x  0 0      0           0 Nov 27 10:36 package
-rw-r--r--  0 0      0         972 Oct 15  2015 package/node_modules/define-properties/CHANGELOG.md
-rw-r--r--  0 0      0        1080 Oct 15  2015 package/node_modules/define-properties/LICENSE
-rw-r--r--  0 0      0        2725 Oct 15  2015 package/node_modules/define-properties/README.md
-rw-r--r--  0 0      0        1593 Oct 15  2015 package/node_modules/define-properties/package.json
-rw-r--r--  0 0      0        3798 Aug 21 11:09 package/node_modules/es-abstract/CHANGELOG.md
-rw-r--r--  0 0      0        1080 Jul 29  2015 package/node_modules/es-abstract/LICENSE
-rw-r--r--  0 0      0        1812 Aug 13  2015 package/node_modules/es-abstract/README.md
-rw-r--r--  0 0      0        1989 Aug 21 11:09 package/node_modules/es-abstract/package.json
-rw-r--r--  0 0      0        1207 Jan  4  2016 package/node_modules/es-to-primitive/CHANGELOG.md
-rw-r--r--  0 0      0        1082 Nov  1  2015 package/node_modules/es-to-primitive/LICENSE
-rw-r--r--  0 0      0        2180 Nov  1  2015 package/node_modules/es-to-primitive/README.md
-rw-r--r--  0 0      0        1558 Jan  4  2016 package/node_modules/es-to-primitive/package.json
-rw-r--r--  0 0      0        1074 Sep 22  2014 package/node_modules/foreach/LICENSE
-rw-r--r--  0 0      0         593 Sep 22  2014 package/node_modules/foreach/Readme.md
-rw-r--r--  0 0      0        1297 Sep 22  2014 package/node_modules/foreach/package.json
-rw-r--r--  0 0      0        1052 Feb 14  2016 package/node_modules/function-bind/LICENSE
-rw-r--r--  0 0      0        1488 Feb 14  2016 package/node_modules/function-bind/README.md
-rw-r--r--  0 0      0        1619 Feb 14  2016 package/node_modules/function-bind/package.json
-rw-r--r--  0 0      0        1060 Jul 24  2015 package/node_modules/has/LICENSE-MIT
-rw-r--r--  0 0      0         239 Jul 24  2015 package/node_modules/has/README.mkd
-rw-r--r--  0 0      0         782 Jul 24  2015 package/node_modules/has/package.json
-rw-r--r--  0 0      0        1839 Feb 28  2016 package/node_modules/is-callable/CHANGELOG.md
-rw-r--r--  0 0      0        1082 May 19  2015 package/node_modules/is-callable/LICENSE
-rw-r--r--  0 0      0        1978 Aug 12  2015 package/node_modules/is-callable/README.md
-rw-r--r--  0 0      0        1983 Feb 28  2016 package/node_modules/is-callable/package.json
-rw-r--r--  0 0      0         421 Sep 27  2015 package/node_modules/is-date-object/CHANGELOG.md
-rw-r--r--  0 0      0        1082 Mar 13  2015 package/node_modules/is-date-object/LICENSE
-rw-r--r--  0 0      0        1751 Aug 12  2015 package/node_modules/is-date-object/README.md
-rw-r--r--  0 0      0        1420 Sep 27  2015 package/node_modules/is-date-object/package.json
-rw-r--r--  0 0      0         482 Jan 30  2015 package/node_modules/is-regex/CHANGELOG.md
-rw-r--r--  0 0      0        1081 Jan 15  2014 package/node_modules/is-regex/LICENSE
-rw-r--r--  0 0      0        1623 Jan 28  2015 package/node_modules/is-regex/README.md
-rw-r--r--  0 0      0        1512 Jan 30  2015 package/node_modules/is-regex/package.json
-rw-r--r--  0 0      0         121 Jan 26  2015 package/node_modules/is-symbol/CHANGELOG.md
-rw-r--r--  0 0      0        1082 Jan 24  2015 package/node_modules/is-symbol/LICENSE
-rw-r--r--  0 0      0        1469 Jan 24  2015 package/node_modules/is-symbol/README.md
-rw-r--r--  0 0      0        1214 Jan 26  2015 package/node_modules/is-symbol/package.json
-rw-r--r--  0 0      0        6992 Jul  5 19:14 package/node_modules/object-keys/CHANGELOG.md
-rw-r--r--  0 0      0        1080 Oct 15  2015 package/node_modules/object-keys/LICENSE
-rw-r--r--  0 0      0        2460 Oct 15  2015 package/node_modules/object-keys/README.md
-rw-r--r--  0 0      0        1955 Jul  5 19:14 package/node_modules/object-keys/package.json
-rw-r--r--  0 0      0         560 Oct  6  2015 package/node_modules/object.entries/CHANGELOG.md
-rw-r--r--  0 0      0        1082 Sep  2  2015 package/node_modules/object.entries/LICENSE
-rw-r--r--  0 0      0        2339 Sep  2  2015 package/node_modules/object.entries/README.md
-rw-r--r--  0 0      0        1636 Oct  6  2015 package/node_modules/object.entries/package.json
-rw-r--r--  0 0      0         145 Nov 27 10:36 package/package.json

npm pack 은 μ˜ˆμƒλŒ€λ‘œ μž‘λ™ν•©λ‹ˆλ‹€ (λ™μΌν•œ λ””λ ‰ν† λ¦¬μ—μ„œ).

$ npm pack && tar -ztvf some-dir-1.0.0.tgz
-rw-r--r--  0 501    20        145 Nov 27 10:36 package/package.json
-rw-r--r--  0 501    20       2460 Nov 27 10:36 package/yarn.lock

μ‹€ 포함에 지μ˜₯을 ꡬ뢀리고 μžˆλ„λ‘μ²˜λŸΌ 보인닀 changelog , readme 및 package.json κ·Έκ²ƒλ„μ—μ„œ 그듀을 포함 node_modules ...

[email protected] μ‚¬μš©

@torifat Published 1.0.2 now (방금 μ–ΈκΈ‰ ν•œ 버그λ₯Ό ν”Όν•˜κΈ° μœ„ν•΄ npm μ‚¬μš©), μ—¬μ „νžˆ λ™μΌν•œ 문제

node_modules와 κ΄€λ ¨λœ 버그에 λŒ€ν•΄ # 2047을 μ—΄μ—ˆμ§€λ§Œ, μ μ ˆν•œ tarball이 κ²Œμ‹œ 된 μƒνƒœμ—μ„œλ„ λ‚΄ μž¬ν˜„μ΄ μ—¬μ „νžˆ μœ νš¨ν•˜κΈ° λ•Œλ¬Έμ—μ΄ λ¬Έμ œμ—μ„œλŠ” 뢉은 μ²­μ–΄μž…λ‹ˆλ‹€.

(κ΅¬λ…μž λΆ„λ“€μ—κ²Œ λ³΄λ‚΄λŠ” μŠ€νŒΈμ— λŒ€ν•΄ μ£„μ†‘ν•©λ‹ˆλ‹€. 이제 κ·Έλ§Œν•˜κ² μŠ΅λ‹ˆλ‹€)

@SimenB μ‹œκ°„ λ‚΄ μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€. λ‚˜λŠ” 버그λ₯Ό μ•Œμ•„ λƒˆλ‹€.

방금 μ—΄μ–΄ λ³Έ # 2104와 κ΄€λ ¨μ΄μžˆλŠ” 것 κ°™μŠ΅λ‹ˆλ‹€. OP μ„€μΉ˜ ν›„ node_modules/.bin :

$ ll node_modules/.bin
total 16
lrwxr-xr-x  1 samuelreed  staff    22B Dec  1 11:16 forever -> ../forever/bin/forever
lrwxr-xr-x  1 samuelreed  staff   109B Dec  1 11:16 nodemon -> ../../../../../Library/Caches/Yarn/npm-nodemon-1.11.0-226c562bd2a7b13d3d7518b49ad4828a3623d06c/bin/nodemon.js

# 2116을 톡해 μˆ˜μ •λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

# 2116이 아직 합병 λ˜μ—ˆλ‚˜μš”? 컀밋 κΈ°λ‘μ—μ„œ λ³Ό 수 μ—†μŠ΅λ‹ˆλ‹€. νƒœκ·Έκ°€ μ§€μ •λœ λ¦΄λ¦¬μŠ€κ°€ μ•„λ‹Œ 경우 적어도 λ§ˆμŠ€ν„°μ—μ„œ μˆ˜μ • 사항을 μ‚¬μš©ν•  수 있기 전에 λ§Žμ€ 문제λ₯Ό λ‹«λŠ” 것이 λ„ˆλ¬΄ 이λ₯Έ 것 κ°™μŠ΅λ‹ˆλ‹€. λ˜ν•œ # 2116이 μ„Έ 가지 검사 λͺ¨λ‘μ— μ‹€νŒ¨ν•œ κ²ƒμ²˜λŸΌ λ³΄μž…λ‹ˆλ‹€. λ‚΄κ°€ λ­”κ°€λ₯Ό λ†“μΉ˜κ³  μžˆμŠ΅λ‹ˆκΉŒ?

이것은 (# 2116)을 ν¬ν•¨ν•˜λŠ” v0.18.0μ—μ„œ μ—¬μ „νžˆ λ¬Έμ œμž…λ‹ˆλ‹€.

예,이 λ¬Έμ œκ°€ μ—¬μ „νžˆ 0.18.0에 μžˆμŒμ„ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.

λ‚΄κ°€ λ³Έ κ²ƒμ—μ„œ # 2116 은이 λ¬Έμ œμ— λŒ€ν•œ ν…ŒμŠ€νŠΈλ₯Ό λ„μž…ν•΄μ•Όν–ˆμŠ΅λ‹ˆλ‹€ ( test.concurrent ( '-production flag ignores dev dependencies'... λ˜λŠ” λ‚΄κ°€ ν‹€λ ΈμŠ΅λ‹ˆκΉŒ?

ν…ŒμŠ€νŠΈλŠ” μ „ 이적 쒅속성에 λŒ€ν•œ μ˜¬λ°”λ₯Έ λ™μž‘μ„ ν™•μΈν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.
제 경우 λ¬Έμ œλŠ” prod (minimatch v2.0.0)와 dev (useragent v2.1.9) 쒅속성 κ°„μ˜ 곡유 쒅속 (lru-cache)μž…λ‹ˆλ‹€. prod 쒅속성에 ν•„μš”ν•˜λ”λΌλ„ ν•΄λ‹Ή 곡유 쒅속 ν•­λͺ©μ€ --production μ„€μΉ˜λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

@beheh minimatch 은 (λŠ”) lru-cache ) μ‚¬μš©ν•˜λŠ” κ²ƒμœΌλ‘œ 보이지 μ•ŠμŠ΅λ‹ˆλ‹€. 그게 ν”„λ‘œλ•μ…˜μ— μ„€μΉ˜λ˜μ§€ μ•Šμ€ μ΄μœ μΌκΉŒμš”?

0.18.0으둜 λͺ‡ 가지 ν…ŒμŠ€νŠΈλ₯Όν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

dep { A->B }
devDep { B }
OK
A,B are installed.
dep { A->C->D }
devDep { B->C->D }
OK
A,C,D are installed.
dep { E->A->C->D }
devDep { B->C->D }
KO
E,A,C are installed but D is missing.

@SimenB κ°€ μ„€λͺ…ν•˜λŠ” κ²½μš°μž…λ‹ˆλ‹€.

"dependencies": {
    "entries-test": "^1.0.1"
  },
  "devDependencies": {
    "object.values": "^1.0.3"
  }

@SharpEdgeMarshall ν…ŒμŠ€νŠΈ

@torifat도 이것을 λ‹€μ‹œ

@SharpEdgeMarshall λ‹€μŒμ„ μ‹œλ„ν–ˆκ³  μž‘λ™ μ€‘μž…λ‹ˆλ‹€. μ‹€μ œ 문제λ₯Ό νŒŒμ•…ν•΄μ•Όν•©λ‹ˆλ‹€.

screenshot 2016-12-06 21 18 44

@SimenB λŠ” λ‹€μ‹œ μ—΄κΈ° 전에 ν™•μΈν•΄μ•Όν•©λ‹ˆλ‹€. μ΄λŠ” optionalDependencies λ•Œλ¬Έμ— λ°œμƒν•  μˆ˜λ„ μžˆμŠ΅λ‹ˆλ‹€. 또 λ‹€λ₯Έ λ¬Έμ œκ°€ μžˆμŠ΅λ‹ˆλ‹€.

@torifat λ‚΄ μž¬ν˜„μ€ μ—¬μ „νžˆ β€‹β€‹λ°œμƒν•©λ‹ˆλ‹€ : https://github.com/yarnpkg/yarn/issues/761#issuecomment -260975012

νŽΈμ§‘ : 선택적 depsκ°€μ—†λŠ” grep optional yarn.lock λŠ” 1둜 μ’…λ£Œλ©λ‹ˆλ‹€.

이제 define-properties λˆ„λ½ λŒ€μ‹  Error: Cannot find module 'object-keys' μ—μ„œ μ‹€νŒ¨ν•©λ‹ˆλ‹€.

$ yarn why object-keys
yarn why v0.18.0
[1/4] πŸ€”  Why do we have the module "object-keys"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] πŸ”  Finding dependency...
[4/4] 🚑  Calculating file sizes...
info This module exists because "object.values#define-properties" depends on it.
✨  Done in 0.09s.

이제 ν•œ 단계 더 깊이 μ²˜λ¦¬ν•˜λŠ” κ²ƒμ²˜λŸΌ λ³΄μ΄μ§€λ§Œ μ‹€νŒ¨ν•©λ‹ˆλ‹€.

@SimenB 방금 μ‹œλ„ :

{
  "dependencies": {
    "entries-test": "^1.0.1"
  },
  "devDependencies": {
    "object.values": "^1.0.3"
  }
}

그리고 그것은 λ‚˜λ₯Ό μœ„ν•΄ 잘 μž‘λ™ν•©λ‹ˆλ‹€. yarn cache clean ν•˜κ³  λ‹€μ‹œ μ‹œλ„ ν•  수 μžˆμŠ΅λ‹ˆκΉŒ?

μ•„λ‹ˆ, μ‹€νŒ¨

@SimenB yarn.lock νŒŒμΌμ„ 곡유 ν•  수 μžˆμŠ΅λ‹ˆκΉŒ?

$ rm -rf node_modules && rm yarn.lock && yarn cache clean && yarn && node index.js && yarn --prod && node index.js
yarn cache v0.18.0
success Cleared cache.
✨  Done in 0.07s.
yarn install v0.18.0
info No lockfile found.
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
✨  Done in 0.92s.
yarn install v0.18.0
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
✨  Done in 0.18s.
module.js:471
    throw err;
    ^

Error: Cannot find module 'object-keys'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/simbekkh/repos/ugh/node_modules/define-properties/index.js:3:12)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

λ‚˜λ₯Ό μœ„ν•΄ SimenB의 μ˜ˆμ œλŠ” yarn cache clean 후에도 0.18.0μ—μ„œ μž‘λ™ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


define-properties@^1.1.2:
  version "1.1.2"
  resolved "http://npm.office.crweb.it/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
  dependencies:
    foreach "^2.0.5"
    object-keys "^1.0.8"

entries-test@^1.0.1:
  version "1.0.2"
  resolved "http://npm.office.crweb.it/entries-test/-/entries-test-1.0.2.tgz#f1039aba3a2effc9c3a56b6b1180694b2789e4d5"
  dependencies:
    object.entries "^1.0.3"

es-abstract@^1.6.1:
  version "1.6.1"
  resolved "http://npm.office.crweb.it/es-abstract/-/es-abstract-1.6.1.tgz#bb8a2064120abcf928a086ea3d9043114285ec99"
  dependencies:
    es-to-primitive "^1.1.1"
    function-bind "^1.1.0"
    is-callable "^1.1.3"
    is-regex "^1.0.3"

es-to-primitive@^1.1.1:
  version "1.1.1"
  resolved "http://npm.office.crweb.it/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
  dependencies:
    is-callable "^1.1.1"
    is-date-object "^1.0.1"
    is-symbol "^1.0.1"

foreach@^2.0.5:
  version "2.0.5"
  resolved "http://npm.office.crweb.it/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"

function-bind@^1.0.2, function-bind@^1.1.0:
  version "1.1.0"
  resolved "http://npm.office.crweb.it/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771"

has@^1.0.1:
  version "1.0.1"
  resolved "http://npm.office.crweb.it/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
  dependencies:
    function-bind "^1.0.2"

is-callable@^1.1.1, is-callable@^1.1.3:
  version "1.1.3"
  resolved "http://npm.office.crweb.it/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"

is-date-object@^1.0.1:
  version "1.0.1"
  resolved "http://npm.office.crweb.it/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"

is-regex@^1.0.3:
  version "1.0.3"
  resolved "http://npm.office.crweb.it/is-regex/-/is-regex-1.0.3.tgz#0d55182bddf9f2fde278220aec3a75642c908637"

is-symbol@^1.0.1:
  version "1.0.1"
  resolved "http://npm.office.crweb.it/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"

object-keys@^1.0.8:
  version "1.0.11"
  resolved "http://npm.office.crweb.it/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"

object.entries@^1.0.3:
  version "1.0.4"
  resolved "http://npm.office.crweb.it/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f"
  dependencies:
    define-properties "^1.1.2"
    es-abstract "^1.6.1"
    function-bind "^1.1.0"
    has "^1.0.1"

object.values@^1.0.3:
  version "1.0.4"
  resolved "http://npm.office.crweb.it/object.values/-/object.values-1.0.4.tgz#e524da09b4f66ff05df457546ec72ac99f13069a"
  dependencies:
    define-properties "^1.1.2"
    es-abstract "^1.6.1"
    function-bind "^1.1.0"
    has "^1.0.1"
$ rm -rf node_modules && rm yarn.lock && yarn cache clean && yarn && node index.js && rm -rf node_modules && rm yarn.lock && yarn cache clean && yarn --prod && node index.js
yarn cache v0.18.0
success Cleared cache.
✨  Done in 0.07s.
yarn install v0.18.0
info No lockfile found.
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
✨  Done in 0.93s.
yarn cache v0.18.0
success Cleared cache.
✨  Done in 0.07s.
yarn install v0.18.0
info No lockfile found.
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
✨  Done in 0.76s.
module.js:471
    throw err;
    ^

Error: Cannot find module 'object-keys'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/simbekkh/repos/ugh/node_modules/define-properties/index.js:3:12)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

잠금 파일 :

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


define-properties@^1.1.2:
  version "1.1.2"
  resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
  dependencies:
    foreach "^2.0.5"
    object-keys "^1.0.8"

entries-test@^1.0.1:
  version "1.0.2"
  resolved "https://registry.yarnpkg.com/entries-test/-/entries-test-1.0.2.tgz#f1039aba3a2effc9c3a56b6b1180694b2789e4d5"
  dependencies:
    object.entries "^1.0.3"

es-abstract@^1.6.1:
  version "1.6.1"
  resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.6.1.tgz#bb8a2064120abcf928a086ea3d9043114285ec99"
  dependencies:
    es-to-primitive "^1.1.1"
    function-bind "^1.1.0"
    is-callable "^1.1.3"
    is-regex "^1.0.3"

es-to-primitive@^1.1.1:
  version "1.1.1"
  resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
  dependencies:
    is-callable "^1.1.1"
    is-date-object "^1.0.1"
    is-symbol "^1.0.1"

foreach@^2.0.5:
  version "2.0.5"
  resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"

function-bind@^1.0.2, function-bind@^1.1.0:
  version "1.1.0"
  resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771"

has@^1.0.1:
  version "1.0.1"
  resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
  dependencies:
    function-bind "^1.0.2"

is-callable@^1.1.1, is-callable@^1.1.3:
  version "1.1.3"
  resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"

is-date-object@^1.0.1:
  version "1.0.1"
  resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"

is-regex@^1.0.3:
  version "1.0.3"
  resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.3.tgz#0d55182bddf9f2fde278220aec3a75642c908637"

is-symbol@^1.0.1:
  version "1.0.1"
  resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"

object-keys@^1.0.8:
  version "1.0.11"
  resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"

object.entries@^1.0.3:
  version "1.0.4"
  resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f"
  dependencies:
    define-properties "^1.1.2"
    es-abstract "^1.6.1"
    function-bind "^1.1.0"
    has "^1.0.1"

object.values@^1.0.3:
  version "1.0.4"
  resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.0.4.tgz#e524da09b4f66ff05df457546ec72ac99f13069a"
  dependencies:
    define-properties "^1.1.2"
    es-abstract "^1.6.1"
    function-bind "^1.1.0"
    has "^1.0.1"

@SimenB κ°μ‚¬ν•©λ‹ˆλ‹€. λ‚΄ μΊμ‹œμ— λ¬Έμ œκ°€μžˆλŠ” 것 κ°™μŠ΅λ‹ˆλ‹€. λ‚΄ μΊμ‹œλ₯Ό μ§€μš°λ©΄ 이제 μ‹€νŒ¨ν•©λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ λ‹€λ₯Έ 였λ₯˜κ°€ μžˆμŠ΅λ‹ˆλ‹€. 쑰사 ν•  μ‹œκ°„μ„μ£Όμ„Έμš”.

Btw,이 μŠ€λ ˆλ“œμ—μ„œ https://github.com/Mottie/Octopatcher λ₯Ό μ‚¬μš©ν•˜λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.

λ§Žμ€ 좜λ ₯ 라인으둜 맀우 μ‹€μš©μ 

image

이제 μŠ€νŒΈμ„ μ€‘μ§€ν•˜κ² μŠ΅λ‹ˆλ‹€

@SimenB v0.18.0 μ—μ„œ μ‹€νŒ¨ν–ˆμ§€λ§Œ μ΅œμ‹  master μ—μ„œλŠ” μž¬ν˜„ ν•  수 μ—†μŠ΅λ‹ˆλ‹€.

μ—…λ°μ΄νŠΈ : μ΄μƒν•©λ‹ˆλ‹€! λ‹€μ‹œ μ‹€νŒ¨ν•©λ‹ˆλ‹€ πŸ˜•

@torifat λ§ˆμŠ€ν„° (v0.19.0)μ—μ„œ μž‘λ™ν•˜μ§€ μ•ŠλŠ” 것을 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.
rm -rf node_modules && rm yarn.lock && ../yarn/bin/yarn cache clean && ../yarn/bin/yarn && node index.js && rm -rf node_modules && rm yarn.lock && ../yarn/bin/yarn cache clean && ../yarn/bin/yarn --prod && node index.js

yarn cache v0.19.0-0
success Cleared cache.
Done in 0.58s.
yarn install v0.19.0-0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 10.18s.
yarn cache v0.19.0-0
success Cleared cache.
Done in 0.09s.
yarn install v0.19.0-0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 4.26s.
module.js:457
    throw err;
    ^

Error: Cannot find module 'object-keys'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/sharpedge/git/Utility/YarnBug/node_modules/define-properties/index.js:3:12)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)

ν˜„μž¬ μ•ˆμ •λœ 0.17.10 와 λ™μΌν•œ λ¬Έμ œκ°€ μžˆμŠ΅λ‹ˆλ‹€ (일뢀 νŒ¨ν‚€μ§€λŠ” --production ν”Œλž˜κ·Έλ‘œ μ„€μΉ˜λ˜μ§€ μ•ŠμŒ).

curl -o- -L https://yarnpkg.com/install.sh | bash && ~/.yarn/bin/yarn install --production && rm -rf ~/.yarn

ν•˜μ§€λ§Œ ν˜„μž¬ μ•Όκ°„ λΉŒλ“œ Yarn 0.19.0-20161207.1241 μ‹œλ„ ν•  λ•Œ ν•„μš”ν•œ λͺ¨λ“  νŒ¨ν‚€μ§€κ°€ λ‚΄ 앱에 μ˜¬λ°”λ₯΄κ²Œ μ„€μΉ˜λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

wget https://yarnpkg.com/install.sh && chmod +x install.sh && ./install.sh --nightly && rm -f install.sh && ~/.yarn/bin/yarn install --production && rm -rf ~/.yarn

@SharpEdgeMarshall @SimenB λŠ” μ΅œμ‹  μ•Όκ°„ λΉŒλ“œλ₯Ό μ‹œλ„ν•˜κ³  λ¬Έμ œκ°€ 지속 λ˜λŠ”μ§€ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.

λ‚΄ 도컀 μ»¨ν…Œμ΄λ„ˆμ—μ„œ μ‚¬μš© : https://gist.github.com/nodkz/b843d65a3430a4f510e5f5eb0cc759d2

@nodkz 18이 λ‚˜μ™”κ³  μ•ˆμ •μ μ΄μ§€λ§Œ (λ‚΄ μƒκ°μ—λŠ”?), λ°”λ‘œ μœ„μ—μžˆλŠ” κ²Œμ‹œλ¬Όμ—μ„œ λ³Ό 수 μžˆλ“―μ΄ λ§ˆμŠ€ν„° (적어도 2 일 μ „)μ—λŠ” μ—¬μ „νžˆ 버그가 μžˆμŠ΅λ‹ˆλ‹€.

μ—¬μ „νžˆ install yarn@rc ν•„μš”ν•˜λ‹€κ³  μƒκ°ν•©λ‹ˆλ‹€.

'dist-tags': { rc: '0.18.0', latest: '0.17.10' },

그것은 μƒˆλ‘œμš΄ κ²ƒμž…λ‹ˆλ‹€. λ©°μΉ  전에 κ·Έλƒ₯ μ„€μΉ˜ν•˜μ—¬ 0.18을 μ–»μ—ˆμŠ΅λ‹ˆλ‹€. μ–΄μ¨Œλ“  λ²„κ·ΈλŠ” 0.18μ—μ„œ μ—¬μ „νžˆ μž¬ν˜„ κ°€λŠ₯ν•©λ‹ˆλ‹€.

@nodkz ReproλŠ” λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€.

{
  "dependencies": {
    "entries-test": "^1.0.1"
  },
  "devDependencies": {
    "object.values": "^1.0.3"
  }
}

λ„€, 우리 ν”„λ‘œμ νŠΈμ—μ„œλ„ λΉ„μŠ·ν•œ λ¬Έμ œκ°€ λ°œμƒν•©λ‹ˆλ‹€.

rm -rf package.json yarn.lock node_modules && npm init --yes && yarn add --dev nodemon && yarn add glob-stream && yarn --prod && node -p "require('glob-stream')"

0.18 및 μ΅œμ‹  λ§ˆμŠ€ν„° λΆ„κΈ° λͺ¨λ‘μ—μ„œ μ‹€νŒ¨ν•©λ‹ˆλ‹€.

λ™μ˜ν•©λ‹ˆλ‹€. μ—¬μ „νžˆ μ΅œμ‹  λ²„μ „μœΌλ‘œ μž¬ν˜„ ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

λ‚΄ λ¬Έμ œλŠ” 이것과 λΉ„μŠ·ν•˜κ±°λ‚˜ κ°™λ‹€κ³  μƒκ°ν•©λ‹ˆλ‹€. Herokuμ—μ„œ λΉŒλ“œκ°€ μ‹€νŒ¨ν•˜μ§€λ§Œ ν”„λ‘œλ•μ…˜ ν™˜κ²½ μ—μ„œλ§Œ κ°€λŠ₯ ν•©λ‹ˆλ‹€. 캐싱이 λΉ„ν™œμ„±ν™”λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

Resolving node version ^7.2.1 via semver.io...
       Downloading and installing node 7.2.1...
       Using default npm version: 3.10.10
       Resolving yarn version (latest) via semver.io...
       Downloading and installing yarn (0.18.1)...
       Installed yarn 0.18.1
-----> Restoring cache
       Skipping cache restore (disabled by config)
-----> Building dependencies
       Installing node modules (yarn)
       yarn install v0.18.1
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       warning [email protected]: The platform "linux" is incompatible with this module.
       info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
       [3/4] Linking dependencies...
       [4/4] Building fresh packages...
       error /tmp/build_0e4ff736ad0f25dc816a47543687fefc/bbb7b6e751dde291f65dea175f41a26862eef28f/node_modules/bcrypt: Command failed.
       Exit code: 1
       Command: sh
       Arguments: -c node-pre-gyp install --fallback-to-build
       Directory: /tmp/build_0e4ff736ad0f25dc816a47543687fefc/bbb7b6e751dde291f65dea175f41a26862eef28f/node_modules/bcrypt
       Output:
       module.js:472
       throw err;
       ^

       Error: Cannot find module 'abbrev'
       at Function.Module._resolveFilename (module.js:470:15)
       at Function.Module._load (module.js:418:25)
       at Module.require (module.js:498:17)
       at require (internal/module.js:20:19)
       at Object.<anonymous> (/tmp/build_0e4ff736ad0f25dc816a47543687fefc/bbb7b6e751dde291f65dea175f41a26862eef28f/node_modules/nopt/lib/nopt.js:10:14)
       at Module._compile (module.js:571:32)
       at Object.Module._extensions..js (module.js:580:10)
       at Module.load (module.js:488:32)
       at tryModuleLoad (module.js:447:12)
       at Function.Module._load (module.js:439:3)
       info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
-----> Build failed

λ‚˜λŠ” λ˜ν•œμ΄ λ¬Έμ œκ°€ μžˆμŠ΅λ‹ˆλ‹€. yarn install --production κ°€ μ˜¬λ°”λ₯Έ 쒅속성을 μ˜¬λ°”λ₯΄κ²Œ μ„€μΉ˜ν•˜μ§€ μ•ŠκΈ° λ•Œλ¬Έμ— ν˜„μž¬ ν”„λ‘œλ•μ…˜μ— yarn install 을 μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

μ œκ°€ μƒκ°ν•˜κΈ°μ— Heroku λΉŒλ“œ νŒ©μ—μ„œ yarn install --production 둜 ν•˜λ“œ μ½”λ”© λ˜μ—ˆκΈ° λ•Œλ¬Έμ— κ·Έλ ‡κ²Œ ν•  수 μ—†μŠ΅λ‹ˆλ‹€ (https://github.com/heroku/heroku-buildpack-nodejs/issues/337 μ°Έμ‘°).

@adamreisnz μ£„μ†‘ν•©λ‹ˆλ‹€. κ·€ν•˜μ˜ λ¬Έμ œκ°€ μ•„λ‹Œ μ›λž˜ 문제λ₯Ό μ–ΈκΈ‰ν–ˆμŠ΅λ‹ˆλ‹€.

문제λ₯Ό ν•΄κ²°ν•˜λ €λ©΄μ΄ λ¬Έμ œκ°€ ν•΄κ²° 될 λ•ŒκΉŒμ§€ λͺ¨λ“  devDependencies λ₯Ό dependencies 에 λ„£λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.

@dashmug μ•„

μ–΄μ¨Œλ“ , λ‚˜λŠ” Yarn이 더 μ•ˆμ • 될 λ•ŒκΉŒμ§€ Herokuμ—μ„œ npm λ₯Ό μ‚¬μš©ν•˜λŠ” 것을 μ„ ν˜Έν•©λ‹ˆλ‹€. yarn.lock λ₯Ό .gitignore λ„£μ—ˆμœΌλ―€λ‘œ repo / heroku에 μ—…λ‘œλ“œλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ΄λ ‡κ²Œν•˜λ©΄ λ‘œμ»¬μ—μ„œ Yarn을 계속 μ‚¬μš©ν•  수 μžˆμ§€λ§Œ Heroku의 λΉŒλ“œμ—λŠ” 영ν–₯을주지 μ•ŠμŠ΅λ‹ˆλ‹€.

@adamreisnz yarn μ‚¬μš© λͺ©μ μ— μœ„λ°°λ©λ‹ˆλ‹€. κ·Έλ ‡κ²Œ μƒκ°ν•˜μ§€ μ•ŠμŠ΅λ‹ˆκΉŒ?

@dashmug 적어도 μš°λ¦¬μ—κ²ŒλŠ” 그렇지 μ•ŠμŠ΅λ‹ˆλ‹€. νŒ¨ν‚€μ§€ 버전을 μž κ·ΈλŠ” 데 μ‚¬μš©ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μš°λ¦¬λŠ” μ΅œμ‹  μ˜μ‘΄μ„±μ„ 가지고 있으며 "λ‚΄ μ»΄ν“¨ν„°μ—μ„œ μž‘λ™"에 λŒ€ν•œ λ¬Έμ œκ°€ μ—†μŠ΅λ‹ˆλ‹€. npm을 λ„˜μ–΄μ„œ yarn으둜 이동 ν•œ 주된 μ΄μœ λŠ” 속도 λ•Œλ¬Έμ΄μ—ˆμŠ΅λ‹ˆλ‹€. 쒅속성이 λ§Žμ€ λ³΅μž‘ν•œ μ•±μ˜ 경우 5 λΆ„μ—μ„œ npm install 둜 5 λΆ„μ—μ„œ yarn으둜 22 초둜 μ΄λ™ν–ˆμŠ΅λ‹ˆλ‹€.

원사가 λΆˆμ•ˆμ •ν•œ ν•œ, κ°œλ°œμ„ μœ„ν•΄ 원사λ₯Ό 둜컬둜 μ‚¬μš©ν•  수 있고 λΉ λ₯Έ μ„€μΉ˜λ₯Ό ν•  수 μžˆλ‹€λ©΄ Herokuμ—μ„œ μ•½κ°„ 더 느린 λΉŒλ“œ ν”„λ‘œμ„ΈμŠ€λ‘œ μ‚΄ 수 μžˆμŠ΅λ‹ˆλ‹€. :)

Yarn은 npm의 λ“œλ‘­ 인 λŒ€μ²΄ν’ˆμœΌλ‘œ κ΄‘κ³ λ©λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ μš°λ¦¬κ°€ κ²ͺ은 문제 쀑 μΌλΆ€λŠ” 이와 같이 μ—¬μ „νžˆ ν•΄κ²°λ˜μ§€ μ•Šμ€ 문제둜 인해 μ‚¬μš©ν•˜μ§€ λͺ»ν•©λ‹ˆλ‹€. λ”°λΌμ„œ ν˜„μž¬λ‘œμ„œλŠ”μ΄ 도ꡬ가 ν•œ κ°€μ§€μ—λŠ” μœ μš©ν•˜μ§€λ§Œ 아직은 λ‹€λ₯Έ λ„κ΅¬μ—λŠ” μœ μš©ν•œ 도ꡬ라고 μƒκ°ν•©λ‹ˆλ‹€. λ‚˜λŠ” 그것이 ν›Œλ₯­ν•˜κ²Œ μž‘λ™ ν•  κ²ƒμ΄λΌλŠ” 데 μ˜μ‹¬μ˜ 여지가 μ—†λ‹€. :)

이것은 0.18.1μ—μ„œ μˆ˜μ • 된 κ²ƒμœΌλ‘œ λ³΄μž…λ‹ˆλ‹€.

HerokuλŠ” μ‹€νŒ¨ν–ˆμ„ λ•Œ 0.18.1을 μ‚¬μš©ν•˜κ³  μžˆμ—ˆμœΌλ―€λ‘œ 아직 μˆ˜μ •λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€.

이 λ¬Έμ œλŠ” 0.18.1μ—μ„œ μˆ˜μ •λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

λ‚΄ 이전 μž¬ν˜„μ€ 0.18.1둜 μˆ˜μ •λ˜μ—ˆμŠ΅λ‹ˆλ‹€ πŸŽ‰

내일 μ§„μ§œ μ•±μœΌλ‘œν•΄λ³Ό 게

0.18.1은 λ‚΄ 문제λ₯Ό ν•΄κ²°ν•©λ‹ˆλ‹€. λ‚˜λŠ” ν–‰λ³΅ν•œ μΊ ν•‘ μΉ΄μ•Ό πŸŽ‰

이전에 μ‹€νŒ¨ν•œ μ‚¬μ†Œν•œ μ•±μœΌλ‘œ 0.18.1을 μ‹œλ„ν–ˆμœΌλ©° μ§€κΈˆμ€ μž‘λ™ν•˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€! πŸŽ‰

곧 λ‹€μ‹œ μ‹œλ„ ν•  것 κ°™μ•„μš” :)

μ£„μ†‘ν•©λ‹ˆλ‹€. μ—¬μ „νžˆ 0.18.1μ—μ„œλŠ” μž‘λ™ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

-----> Node.js app detected
-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=true
       NODE_ENV=production
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  ^7.2.1
       engines.npm (package.json):   unspecified (use default)

       Resolving node version ^7.2.1 via semver.io...
       Downloading and installing node 7.2.1...
       Using default npm version: 3.10.10
       Resolving yarn version (latest) via semver.io...
       Downloading and installing yarn (0.18.1)...
       Installed yarn 0.18.1
-----> Restoring cache
       Loading 2 from cacheDirectories (default):
       - node_modules
       - bower_components (not cached - skipping)
-----> Building dependencies
       Installing node modules (yarn)
       yarn install v0.18.1
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       warning [email protected]: The platform "linux" is incompatible with this module.
       info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
       [3/4] Linking dependencies...
       [4/4] Building fresh packages...
       error /tmp/build_c86802dccae94b3fb074d3b88f3f63f2/9512deeed23c0eca48d68fb2c8850a28f76692ea/node_modules/bcrypt: Command failed.
       Exit code: 1
       Command: sh
       Arguments: -c node-pre-gyp install --fallback-to-build
       Directory: /tmp/build_c86802dccae94b3fb074d3b88f3f63f2/9512deeed23c0eca48d68fb2c8850a28f76692ea/node_modules/bcrypt
       Output:
       module.js:472
       throw err;
       ^

       Error: Cannot find module 'abbrev'
       at Function.Module._resolveFilename (module.js:470:15)
       at Function.Module._load (module.js:418:25)
       at Module.require (module.js:498:17)
       at require (internal/module.js:20:19)
       at Object.<anonymous> (/tmp/build_c86802dccae94b3fb074d3b88f3f63f2/9512deeed23c0eca48d68fb2c8850a28f76692ea/node_modules/nopt/lib/nopt.js:10:14)
       at Module._compile (module.js:571:32)
       at Object.Module._extensions..js (module.js:580:10)
       at Module.load (module.js:488:32)
       at tryModuleLoad (module.js:447:12)
       at Function.Module._load (module.js:439:3)
       info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
-----> Build failed

       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys

       Some possible problems:

       - A module may be missing from 'dependencies' in package.json
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys#ensure-you-aren-t-relying-on-untracked-dependencies

       - This module may be specified in 'devDependencies' instead of 'dependencies'
       https://devcenter.heroku.com/articles/nodejs-support#devdependencies

       Love,
       Heroku

 !     Push rejected, failed to compile Node.js app.
 !     Push failed

NODE_MODULES_CACHE=false 도 λ„μ›€μ΄λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€.

λ‹€μŒμ€ 쒅속성 νŠΈλ¦¬μž…λ‹ˆλ‹€.

β”œβ”€β”¬ [email protected]
β”‚ └─┬ [email protected]
β”‚   └─┬ [email protected]
β”‚     └─┬ [email protected]
β”‚       └─┬ [email protected]
β”‚         └── [email protected] 
β”œβ”€β”¬ [email protected]
β”‚ └─┬ @google-cloud/[email protected]
β”‚   └─┬ @google-cloud/[email protected]
β”‚     └─┬ [email protected]
β”‚       └─┬ [email protected]
β”‚         └─┬ [email protected]
β”‚           └── [email protected] 
└─┬ [email protected]
  └── [email protected] 

λ¬Έμ œλŠ” google-cloud λ₯Ό ν†΅ν•œ κΉŠμ€ 쒅속성이라고 μƒκ°ν•©λ‹ˆλ‹€. 이것은 ν”„λ‘œλ•μ…˜ λͺ¨λ“ˆμ΄λ©° bable-cli 및 instanbul λͺ¨λ‘ 개발 μ „μš©μž…λ‹ˆλ‹€.

λ˜ν•œ yarn why abbrev μ‚¬μš©ν•  λ•Œ google-cloud 및 babel-cli λΆ€λͺ¨ λΆ€μ–‘ 가쑱을 μ„ νƒν•˜μ§€ λͺ»ν•©λ‹ˆλ‹€.

yarn why v0.18.1
[1/4] πŸ€”  Why do we have the module "abbrev"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] πŸ”  Finding dependency...
[4/4] 🚑  Calculating file sizes...
info Reasons this module exists
   - "istanbul" depends on it
   - "istanbul#nopt" depends on it

@jkrems , @SimenB μƒˆλ‘œμš΄ 문제λ₯Ό μ œκΈ°ν• κΉŒμš”?

istanbul#nopt 도 why 좜λ ₯μ—μ„œ 잘λͺ» λ³΄μž…λ‹ˆλ‹€.
μ§€κΈˆ μΌν•˜λŸ¬κ°€λŠ” μ€‘μž…λ‹ˆλ‹€. 그럼 μ‹€μ œ μ•±μ—μ„œ ν…ŒμŠ€νŠΈν•˜κ² μŠ΅λ‹ˆλ‹€.

@SimenB κ°μ‚¬ν•©λ‹ˆλ‹€. 더 λ§Žμ€ 정보가 ν•„μš”ν•˜λ©΄ μ•Œλ €μ£Όμ„Έμš”. 예λ₯Ό λ“€μ–΄ 전체 package.json λͺ¨λ“ˆ λͺ©λ‘μž…λ‹ˆλ‹€.

νŽΈμ§‘ : μ‹€μ œλ‘œ 여기에 μžˆμŠ΅λ‹ˆλ‹€.

"dependencies": {
    "bcrypt": "^1.0.1",
    "bluebird": "^3.4.6",
    "body-parser": "^1.15.2",
    "chalk": "^1.1.3",
    "compression": "^1.6.2",
    "cookie-parser": "^1.4.3",
    "cors": "^2.8.1",
    "express": "^4.14.0",
    "glob": "^7.1.1",
    "google-cloud": "^0.45.1",
    "handlebars": "^4.0.6",
    "html-pdf": "^2.1.0",
    "http-as-promised": "^1.1.0",
    "meanie-express-error-handling": "git+https://github.com/meanie/express-error-handling#2.0.0",
    "meanie-express-github-service": "^2.0.2",
    "meanie-express-jwt-service": "^1.0.2",
    "meanie-express-raven-service": "^1.0.1",
    "meanie-mail-composer": "^1.2.0",
    "meanie-mongoose-only-id": "^1.0.1",
    "meanie-mongoose-set-properties": "^1.0.1",
    "meanie-mongoose-to-json": "^1.1.0",
    "meanie-multer-mime-types-filter": "^1.0.1",
    "meanie-passport-refresh-strategy": "^1.1.2",
    "moment": "^2.17.1",
    "mongoose": "^4.7.3",
    "morgan": "^1.7.0",
    "multer": "^1.1.0",
    "passport": "^0.3.2",
    "passport-http-bearer": "^1.0.1",
    "passport-local": "^1.0.0",
    "phantomjs-prebuilt": "2.1.14",
    "sendgrid": "^4.7.1",
    "sendgrid-mailer": "^1.0.7",
    "socket.io": "^1.7.2",
    "yargs": "^6.5.0"
  },
  "devDependencies": {
    "babel-cli": "^6.16.0",
    "babel-preset-es2015": "^6.18.0",
    "chai": "^3.5.0",
    "chai-as-promised": "^6.0.0",
    "dirty-chai": "^1.2.2",
    "eslint": "^3.12.1",
    "express-simulate-latency": "0.0.2",
    "istanbul": "^1.0.0-alpha.2",
    "mocha": "^3.2.0",
    "mocha-clean": "^1.0.0",
    "nodemon": "^1.11.0",
    "sinon": "^1.17.6",
    "sinon-as-promised": "^4.0.0",
    "sinon-mongoose": "^1.3.0"
  }

이것은 직μž₯μ—μ„œ 앱에 μ—¬μ „νžˆ μ‹€νŒ¨ν•©λ‹ˆλ‹€. Yarn이 κΉŠμ€ 길을 λ”°λΌκ°ˆ μˆ˜μ—†λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€. npm ls entities 이후 yarn --prod

$ npm ls entities
[email protected] /Users/simbekkh/repos/frontpage
└─┬ @finn-no/[email protected]
  └─┬ [email protected]
    └─┬ [email protected]
      └─┬ [email protected]
        └─┬ [email protected]
          └─┬ [email protected]
            └── UNMET DEPENDENCY entities@~1.1.1

npm ERR! missing: entities@~1.1.1, required by [email protected]

@adamreisnz 와 λ™μΌν•˜κ²Œ yarn why λŠ” μ˜¬λ°”λ₯Έ 트리λ₯Ό μ„ νƒν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

$ yarn why entities
yarn why v0.18.1
[1/4] πŸ€”  Why do we have the module "entities"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] πŸ”  Finding dependency...
[4/4] 🚑  Calculating file sizes...
info Reasons this module exists
   - "cheerio" depends on it
   - "cheerio#htmlparser2" depends on it
info Disk size without dependencies: "108kB"
info Disk size with unique dependencies: "108kB"
info Disk size with transitive dependencies: "108kB"
info Amount of shared dependencies: 0
✨  Done in 0.40s.

istanbul # noptλŠ” μ™œ 좜λ ₯μ—μ„œ β€‹β€‹μž˜λͺ» λ³΄μž…λ‹ˆλ‹€.

이 문제의 핡심 인 것 κ°™μŠ΅λ‹ˆλ‹€. nopt 이 google-cloud 및 / λ˜λŠ” babel-cli λŒ€μ‹  istanbul νŒ¨ν‚€μ§€μ˜ 일뢀라고 μƒκ°ν•˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€. λ”°λΌμ„œ ν”„λ‘œλ•μ…˜ 용으둜 μ„€μΉ˜ν•˜μ§€ μ•ŠλŠ” 것 κ°™μŠ΅λ‹ˆλ‹€. istanbul λŠ” prod 쒅속성이 μ•„λ‹ˆκΈ° λ•Œλ¬Έμž…λ‹ˆλ‹€.

μ•ˆλ…•ν•˜μ„Έμš” μ—¬λŸ¬λΆ„,이 λ¬Έμ œκ°€ κ½€ μ˜€λž«λ™μ•ˆ λ°œμƒν•΄μ„œ μ£„μ†‘ν•©λ‹ˆλ‹€.
이 문제λ₯Ό λ‚˜ μžμ‹ μ—κ²Œ ν• λ‹Ήν•˜κ³  μ΄μ œλŠ” μš°μ„  μˆœμœ„κ°€ λ†’μœΌλ―€λ‘œ 휴일 λ™μ•ˆ ν•΄κ²°ν•˜λ €κ³  λ…Έλ ₯ν•  κ²ƒμž…λ‹ˆλ‹€.
격리 된 λΈŒλ ˆμ΄ν‚Ή ν…ŒμŠ€νŠΈ λ˜λŠ” μˆ˜μ • (μ΄μƒμ μœΌλ‘œ)μ΄μžˆλŠ” 도움말 및 ν™λ³΄λŠ” 맀우 ν™˜μ˜ν•©λ‹ˆλ‹€.

gulp-imagemin 의 선택적 쒅속성 πŸ˜•μ˜ 쒅속성 인 lib bl prod ν™˜κ²½μ—μ„œλ„ λ™μΌν•œ λ¬Έμ œκ°€ λ°œμƒν•©λ‹ˆλ‹€.

[~/Workspaces/my-project 12:05:33] NODE_ENV=production yarn
yarn install v0.18.1
info No lockfile found.
[1/4] πŸ”  Resolving packages...
warning algoliasearch > [email protected]: Just use Array.isArray directly
warning gulp-file > through2 > xtend > [email protected]:
warning raven > [email protected]: use uuid module instead
warning wiredep > bower-config > [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
warning chromedriver > [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
warning mversion > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning wiredep > glob > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning webdriverio > request > [email protected]: use uuid module instead
warning gulp > vinyl-fs > glob-watcher > gaze > globule > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob > [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
warning sprity-lwip > lwip > decree > [email protected]: This package is discontinued. Use lodash@^4.0.0.
[2/4] 🚚  Fetching packages...
warning [email protected]: The engine "ender" appears to be invalid.
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
[1/7] β ‚ fsevents: GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.15/fse-v1.0.15-node-v51-darwi
[2/7] β ‚ gifsicle
[3/7] β ‚ jpegtran-bin
[4/7] β ‚ optipng-bin
error /Users/fdubost/Workspaces/my-project/node_modules/gifsicle: Command failed.
Exit code: 1
Command: sh
Arguments: -c node lib/install.js
Directory: /Users/fdubost/Workspaces/my-project/node_modules/gifsicle
Output:
module.js:474
    throw err;
    ^

Error: Cannot find module 'bl'
    at Function.Module._resolveFilename (module.js:472:15)
    at Function.Module._load (module.js:420:25)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/fdubost/Workspaces/my-project/node_modules/tar-stream/extract.js:2:10)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)

도와 μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€ 😊

package.json에 bl 을 μˆ˜λ™μœΌλ‘œ μΆ”κ°€ν•˜λ©΄ μž‘λ™ν•©λ‹ˆλ‹€.

이것에 λŒ€ν•œ μ†Œμ‹μ΄ μžˆμŠ΅λ‹ˆκΉŒ?

아직은 Yarn의 호이 μŠ€νŒ… 및 ν•΄κ²° μ•Œκ³ λ¦¬μ¦˜ https://github.com/yarnpkg/yarn/pull/2419 와 λ…λ¦½μ μœΌλ‘œ node_modules ꡬ쑰λ₯Ό ν™•μΈν•˜λŠ” μž„μ‹œ commonJS 검사기λ₯Ό κ΅¬μΆ•ν•˜κ³ 
이 버그에 μ„€λͺ… 된 λͺ¨λ“  경우λ₯Ό ν¬μ°©ν•˜κ³  ν–₯ν›„ νšŒκ·€λ‘œλΆ€ν„° 우리λ₯Ό 보호 ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

@kittens κ°€ μ—¬κΈ°μ„œ 무슨 일이 μΌμ–΄λ‚˜κ³  μžˆλŠ”μ§€ μ‚΄νŽ΄λ³΄κ³  μžˆμŠ΅λ‹ˆλ‹€.
λ²„κ·ΈλŠ” μ‚¬μ†Œν•œ 것이 μ•„λ‹ˆλ―€λ‘œ μΆ”κ°€ 톡찰λ ₯을 ν™˜μ˜ν•©λ‹ˆλ‹€

μ’‹μ•„, 이제 μ΅œμ‹  트렁크둜 λͺ¨λ“  μž¬ν˜„μ„ μˆ˜μ§‘ν•©λ‹ˆλ‹€.
첫 번째 μ£Όμ„μ˜ μ˜ˆλŠ” 더 이상 μž¬ν˜„λ˜μ§€ μ•ŠμœΌλ©° yarn check --verify-tree 톡과

이것은 λ„ˆλ¬΄ λ³΅μ œν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€ https://github.com/yarnpkg/yarn/issues/761#issuecomment -260975012 및 https://github.com/yarnpkg/yarn/issues/761#issuecomment -265823529

예, κ·Έ μž¬ν˜„μ€ 0.18.1둜 μˆ˜μ •λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

2 가지 아이디어 :

λ‹Ήμ‹ κ³Ό 곡유 ν•  μˆ˜μžˆλŠ” κ²°μ˜μ•ˆμ΄ 기둝 된 λ‘œκ·Έκ°€ μžˆμŠ΅λ‹ˆκΉŒ?

λ˜ν•œ 직μž₯μ—μ„œ 그것을 μž¬ν˜„ν•˜λŠ” 잠금 νŒŒμΌμ„ 제곡 ν•  수 μžˆμ§€λ§Œ 개인 deps λ•Œλ¬Έμ— μ„€μΉ˜ν•  수 μ—†μŠ΅λ‹ˆλ‹€. νŒ¨ν‚€μ§€ κ°€μ Έ 였기λ₯Ό κ±΄λ„ˆ λ›°κ³  λ‚˜λ¬΄λ₯Ό μ—‰λ§μœΌλ‘œ λ§Œλ“€ 수 μžˆμŠ΅λ‹ˆκΉŒ?

@SimenB , κ·Έλž˜μ„œ 당신은 --production μ„€μΉ˜μ— λŒ€ν•œ 해상도가 깨진 또 λ‹€λ₯Έ μ˜ˆκ°€ μžˆμŠ΅λ‹ˆκΉŒ?

이 경우 μ‹œλ„ν•΄ λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€.

yarn install --production --verbose
yarn check --production --verify-tree

μ΅œμ‹  λ§ˆμŠ€ν„° 브랜치둜.
둜그λ₯Ό 곡개적으둜 보내지 μ•ŠμœΌλ €λ©΄ [email protected] 으둜 λ©”μ‹œμ§€λ₯Ό λ³΄λ‚΄μ£Όμ„Έμš”.

예, 0.18.1은 μ—¬μ „νžˆ β€‹β€‹μ†μƒλ˜μ—ˆμœΌλ©° 0.19 (λ˜λŠ” λ§ˆμŠ€ν„°)λ₯Ό ν…ŒμŠ€νŠΈν•˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. κ·Έλž˜λ„ μž¬ν˜„λ˜λ©΄ (μ•ˆλΌ!) 둜그λ₯Ό λΉ„κ³΅κ°œλ‘œ 보내 λ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€.

제λͺ© λ¬Έμ œκ°€ ν•΄κ²°λ˜μ—ˆμœΌλ―€λ‘œμ΄ μž‘μ—…μ„ μ’…λ£Œν•˜κ² μŠ΅λ‹ˆλ‹€.
아직 λ‹€μ‹œ ν™•μΈν•˜μ§€ μ•Šμ€ 2 개의 곡개 된 ν•­λͺ©μ΄ μžˆμŠ΅λ‹ˆλ‹€. # 2263 및 # 2141 여기에 자유둭게 λŒ“κΈ€μ„ λ‹¬κ±°λ‚˜ κ·€ν•˜μ˜ 사둀에 λŒ€ν•œ μƒˆ ν•­λͺ©μ„ λ§Œλ“€κ³  λ‚˜λ₯Ό μ°Έμ‘°ν•˜μ‹­μ‹œμ˜€.

2all : μ„€μΉ˜κ°€ 잘λͺ»λ˜μ—ˆλ‹€κ³  μ–ΈκΈ‰ ν•  λ•Œ λ‹€λ₯Έ μ‚¬λžŒλ“€μ΄μ΄λ₯Ό μž¬ν˜„ ν•  수 μžˆλ„λ‘ package.json을 ν¬ν•¨ν•˜μ‹­μ‹œμ˜€.
: ν•œ 단계 더 λ§Œλ“€κ³  멋진 생식 슀크립트λ₯Ό 제좜 @jkrems ν–ˆλ„€ https://github.com/yarnpkg/yarn/issues/761#issuecomment -265823529

@bestander λŠ” https://github.com/yarnpkg/yarn/issues/761#issuecomment -268130124도 λ‹€μ‹œ 확인 ν–ˆμŠ΅λ‹ˆκΉŒ?

@adamreisnz , package.json을 λ‹€μ‹œ κ³΅μœ ν•΄ μ£Όμ‹œκ² μŠ΅λ‹ˆκΉŒ?

https://github.com/yarnpkg/yarn/issues/761#issuecomment -268130124λŠ” λ‹€λ₯Έ λ¬Έμ œμž…λ‹ˆλ‹€.

yarn install --production λŒ€ν•΄ μ‹€νŒ¨ν•©λ‹ˆλ‹€.

이 λ¬Έμ œλŠ” yarn install --production 성곡에 κ΄€ν•œ κ²ƒμ΄μ§€λ§Œ μ˜¬λ°”λ₯Έ μΌμ„ν•˜μ§€ μ•Šκ³  μžˆμŠ΅λ‹ˆλ‹€.

@bestander μ•„λž˜ λŒ“κΈ€μ—μ„œ κ³΅μœ ν–ˆμŠ΅λ‹ˆλ‹€. https://github.com/yarnpkg/yarn/issues/761#issuecomment -268201708, cheers

μ—¬μ „νžˆ λ‚˜λ₯Ό μœ„ν•΄ λ§ˆμŠ€ν„° (c98df16b)둜 μ‹€νŒ¨ν•©λ‹ˆλ‹€ ...

yarn check --verify-tree λ˜μ§€λ©΄ μœ λ§ν•©λ‹ˆλ‹€. ν•˜μ§€λ§Œ κ·Έ 쀑 μƒλ‹Ήμˆ˜λŠ” 개발 νŒ€μž…λ‹ˆλ‹€.

yarn check v0.20.0-0
error "babel-preset-es2015" not installed
error "browserify-middleware" not installed
error "cheerio" not installed
error "codeceptjs" not installed
error "del-cli" not installed
error "eslint" not installed
error "eslint-config-finn" not installed
error "espower-loader" not installed
error "hashmark" not installed
error "interfake" not installed
error "nightmare" not installed
error "nightmare-upload" not installed
error "nock" not installed
error "nodemon" not installed
error "nyc" not installed
error "power-assert" not installed
error "sinon" not installed
error "supertest" not installed
error "uglifyify" not installed
error "@finn-no/express-base#nunjucks#chokidar#anymatch" not installed
error "@finn-no/express-base#unleash-client#request#json-stringify-safe" not installed
error "@finn-no/express-base#pretty-error#renderkid#css-select#domutils#dom-serializer#entities" not installed
error Found 22 errors.

앱을 μ‹€ν–‰ν•˜λ©΄ 일치 ν•­λͺ©μ΄ λˆ„λ½λ˜λ©΄ μ‹€νŒ¨ν•©λ‹ˆλ‹€.

npm ls λŠ” λ‹€λ₯Έ λˆ„λ½ 된 depsλ₯Ό λ³΄μ—¬μ€λ‹ˆλ‹€.

npm ERR! extraneous: [email protected] /Users/simbekkh/repos/frontpage/node_modules/node-pre-gyp
npm ERR! missing: anymatch@^1.3.0, required by [email protected]
npm ERR! missing: entities@~1.1.1, required by [email protected]
npm ERR! missing: json-stringify-safe@~5.0.1, required by [email protected]

그리고 이것이 문제의 κ΄€μ°° / μ›μΈμž…λ‹ˆλ‹€ : https://github.com/yarnpkg/yarn/issues/761#issuecomment -268331340

이 문제의 핡심 인 것 κ°™μŠ΅λ‹ˆλ‹€. noptλŠ” google-cloud 및 / λ˜λŠ” babel-cli λŒ€μ‹  istanbul νŒ¨ν‚€μ§€μ˜ 일뢀라고 μƒκ°ν•˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€. κ·Έλž˜μ„œ μ΄μŠ€νƒ„λΆˆμ€ μ œν’ˆ 쒅속성이 μ•„λ‹ˆκΈ° λ•Œλ¬Έμ— ν”„λ‘œλ•μ…˜ ν™˜κ²½μ— μ„€μΉ˜ν•˜μ§€ μ•ŠλŠ” 것 κ°™μŠ΅λ‹ˆλ‹€.

μ•„, λ―Έμ•ˆ ν•΄μš” @SimenB

yarn check --prodution --verify-tree

λŒ“κΈ€μ„ μˆ˜μ •ν•˜κ² μŠ΅λ‹ˆλ‹€.

yarn check --verify-tree --production ν•˜λ©΄ 쒋은 κ²°κ³Όλ₯Ό 얻을 수 μžˆμŠ΅λ‹ˆλ‹€ ( npm ls λ™μ˜ν•©λ‹ˆλ‹€).

yarn check v0.20.0-0
error "@finn-no/express-base#nunjucks#chokidar#anymatch" not installed
error "@finn-no/express-base#unleash-client#request#json-stringify-safe" not installed
error "@finn-no/express-base#pretty-error#renderkid#css-select#domutils#dom-serializer#entities" not installed
error Found 3 errors.

@bestander package.json, yarn.lock 및 μžμ„Έν•œ μ„€μΉ˜ 둜그λ₯Ό μ΄λ©”μΌλ‘œ λ³΄λ‚΄λ“œλ¦½λ‹ˆλ‹€ πŸ˜„

@dashmug ν•΄λ‹Ή λ¬Έμ œμ— λŒ€ν•œ μƒˆ 티켓을 생성 ν•˜μ‹œκ² μŠ΅λ‹ˆκΉŒ? μ—¬μ „νžˆ 잘λͺ»λœ 쒅속성이 μ„€μΉ˜λ˜λŠ” 문제 (ν”„λ‘œλ•μ…˜μ—λ§Œ 해당됨)μ΄λ―€λ‘œμ΄ ν‹°μΌ“κ³Ό 관련이 μžˆλ‹€κ³  μƒκ°ν•©λ‹ˆλ‹€.

@bestander 이메일을 λ³΄λƒˆμŠ΅λ‹ˆλ‹€.
@finn-no/express-base 은 (λŠ”) 곡개적으둜 μ‚¬μš© κ°€λŠ₯ν•˜μ§€ μ•Šμ§€λ§Œ 좜λ ₯의 λ‹€λ₯Έ 3 개 νŒ¨ν‚€μ§€λŠ” 곡개 된 νŒ¨ν‚€μ§€λ‘œλ§Œ μž¬ν˜„ ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

μƒˆλ‘œμš΄ 문제λ₯Ό μ—΄μ–΄μ•Όν•©λ‹ˆκΉŒ?

@adamreisnz , 그럼 μƒˆ 문제λ₯Ό λ§Œλ“€μ–΄ μ£Όμ‹œκ² μŠ΅λ‹ˆκΉŒ?
μž¬ν˜„ ν•  수 μžˆμ§€λ§Œ 제λͺ©κ³ΌλŠ” λ‹€λ₯Έ 문제

관련이 μžˆμŠ΅λ‹ˆλ‹€. μ•„λ§ˆλ„ 같은 원인 일 κ²ƒμž…λ‹ˆλ‹€. λ‹€λ₯Έ μ¦μƒμž…λ‹ˆλ‹€. 제λͺ©μ΄ λ§ν•˜λŠ” 것과 μ •ν™•νžˆ 같지 μ•ŠκΈ° λ•Œλ¬Έμ— λ‹€λ₯Έ 문제둜 μƒκ°ν•©λ‹ˆλ‹€.

@SimenB , κ°μ‚¬ν•©λ‹ˆλ‹€.

μ’‹μ•„, μ–˜λ“€ μ•„.

@bestander μ‹€νŒ¨ν•œ 좜λ ₯의 3 개만 νŒ¨ν‚€μ§€λ₯Ό λ§Œλ“€λ©΄ 곡개 deps만으둜 λ§ˆμŠ€ν„°μ—μ„œ μž¬ν˜„ ν•  수 μžˆμŠ΅λ‹ˆλ‹€. μ΅œμ†Œν•œμ˜ μž¬μƒμ‚°μ€ μ•„λ‹ˆμ§€λ§Œ μ—¬μ „νžˆ

{
  "name": "app",
  "version": "1.0.0",
  "dependencies": {
    "brakes": "^2.5.1",
    "compression": "^1.6.2",
    "envalid": "^2.4.0",
    "express": "^4.14.0",
    "object.entries": "^1.0.4",
    "prom-client": "^7.0.0",
    "response-time": "^2.3.2",
    "spaden": "^7.13.1",
    "yarn-issue-repro-package": "^1.0.0"
  },
  "devDependencies": {
    "babel-preset-es2015": "^6.18.0",
    "browserify": "^13.1.1",
    "browserify-middleware": "^7.1.0",
    "cheerio": "^0.22.0",
    "codeceptjs": "^0.4.13",
    "del-cli": "^0.2.1",
    "eslint": "^3.12.2",
    "eslint-config-finn": "^1.0.1",
    "espower-loader": "^1.0.1",
    "hashmark": "^4.1.0",
    "interfake": "^1.19.0",
    "mocha": "^3.2.0",
    "nightmare": "^2.9.0",
    "nightmare-upload": "^0.1.1",
    "nock": "^9.0.2",
    "nodemon": "^1.11.0",
    "nyc": "^10.0.0",
    "power-assert": "^1.4.1",
    "sinon": "^1.17.6",
    "supertest": "^2.0.1",
    "uglify-js": "^2.7.5",
    "uglifyify": "^3.0.4"
  }
}

package.json / yarn-issue-repro-package

{
  "name": "yarn-issue-repro-package",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "nunjucks": "^2.5.2",
    "pretty-error": "^2.0.2",
    "unleash-client": "^1.0.0-beta.7"
  }
}

ν₯λ―Έλ‘­κ²Œλ„ 3 개 λŒ€μ‹  4 개의 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆλ‹€.

$ yarn check v0.20.0-0                                                                                                   β”‚β”œβ”€ [email protected]
error "yarn-issue-repro-package#nunjucks#chokidar#anymatch" not installed                                              │└─ [email protected]
error "yarn-issue-repro-package#unleash-client#request#json-stringify-safe" not installed                              β”‚βœ¨  Done in 2.65s.
error "yarn-issue-repro-package#nunjucks#yargs#string-width#code-point-at" not installed                               β”‚ ~/repos/yarn-issue-repro-package ξ‚° vim package.json
error "yarn-issue-repro-package#pretty-error#renderkid#css-select#domutils#dom-serializer#entities" not installed      β”‚ ~/repos/yarn-issue-repro-package ξ‚° npm publish
error Found 4 errors.

이것이 λ™μΌν•œ λ¬Έμ œμΈμ§€ ν™•μ‹€ν•˜μ§€ μ•Šμ§€λ§Œ 여기에 좜λ ₯이 μžˆμŠ΅λ‹ˆλ‹€ (0.19.1둜 ν…ŒμŠ€νŠΈ 됨).

μ„€μΉ˜ 문제의 κ·Όλ³Έ 원인을 찾은 것 κ°™μŠ΅λ‹ˆλ‹€.
νŒ¨ν‚€μ§€ μ„€μΉ˜ μ‹€νŒ¨λŠ” λ‹€μŒ package.json으둜 μž¬ν˜„ ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

{ "dependencies": {
    "bcrypt": "^1.0.1",
    "gamepad": "1.4.2"
  },
  "devDependencies": {
     "istanbul": "^1.0.0-alpha.2"
  }
}

그리고 λͺ…λ Ή

rm -rf node_modules yarn.lock
yarn install
rm -rf node_modules
yarn install --production
npm ls abbrev

이 κ΅¬μ„±μ—μ„œλŠ” abbrev κ°€ μ„€μΉ˜λ˜μ–΄ μžˆμ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

abbrev λŠ” istanbul 및 nopt ( yarn why abbrev μ—μ„œ λ³Ό 수 있음). nopt λŠ” istanbul 및 node-pre-gyp μ‚¬μš©λ©λ‹ˆλ‹€ ( bcrypt 및 gamepad μ‚¬μš©λ¨).

νŒ¨ν‚€μ§€ 호 μ΄μŠ€ν„°μ—μ„œ abbrev 쀑볡 μ œκ±°μ‹œ λ‹€μŒ μ½”λ“œλ₯Ό μ‚¬μš©ν•˜μ—¬ 호이 μŠ€νŒ… λ ˆμ½”λ“œμ˜ μƒˆλ‘œμš΄ isIgnored κΈ°λŠ₯을 νŒλ³„ν•©λ‹ˆλ‹€.

          // switch to non ignored if earlier deduped version was ignored
          if (existing.isIgnored() && !info.isIgnored()) {
            existing.isIgnored = info.isIgnored;
          }

abbrev λŠ” 처리 ν•  첫 번째 호이 μŠ€νŒ… λ ˆμ½”λ“œ 쀑 ν•˜λ‚˜μž…λ‹ˆλ‹€. μ΄λ•Œ κΈ°μ‘΄ λ ˆμ½”λ“œλŠ” istanbul#abbrev ( istanbul κ°€ λ¬΄μ‹œλ˜λ―€λ‘œ λ¬΄μ‹œ 됨)이고 쀑볡 λ ˆμ½”λ“œλŠ” istanbul#nopt#abbrev 이며 같은 이유둜 λ¬΄μ‹œλ©λ‹ˆλ‹€. .

두 λ ˆμ½”λ“œκ°€ λͺ¨λ‘ λ¬΄μ‹œλ˜κΈ° λ•Œλ¬Έμ— λ¬΄μ‹œ κΈ°λŠ₯은 μ˜ˆμƒλŒ€λ‘œ μ‘°μ •λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. nopt 의 μ’…μ†μ„±μœΌλ‘œ 인해 λ‚˜μ€‘μ— 쀑볡 μ œκ±°μ—μ„œ node-pre-gyp λ¬΄μ‹œλ˜μ§€ μ•ŠκΈ° λ•Œλ¬Έμž…λ‹ˆλ‹€. 두 λ ˆμ½”λ“œμ˜ λ¬΄μ‹œ μƒνƒœλŠ” μ–Έμ œλ“ μ§€ λ³€κ²½ 될 수 μžˆμœΌλ―€λ‘œ μƒˆ λ¬΄μ‹œ κΈ°λŠ₯이이λ₯Ό ν˜Όν•©ν•΄μ•Όν•©λ‹ˆλ‹€.

그리고 μ‹€μ œλ‘œ μ„€μΉ˜ λ¬Έμ œλŠ” ν•΄λ‹Ή 라인을

          // switch to non ignored if earlier deduped version was ignored
          if (existing.isIgnored()) {
            if (info.isIgnored()) {
              // both are ignored now, but any one could become non ignored later on.
              let oldIsIgnored = existing.isIgnored;
              existing.isIgnored = () => oldIsIgnored() && info.isIgnored();
            } else {
              existing.isIgnored = info.isIgnored;
            }
          }

@blexrob , 쒋은 μ°ΎκΈ°!
PR을 λ³΄λ‚΄μ‹œκ² μŠ΅λ‹ˆκΉŒ?
μ§€κΈˆ μˆ˜μ •ν•΄μ•Όν•˜λŠ” integration.js에 "--production으둜 μ„€μΉ˜ν•  λ•Œ 쒅속성을 μžƒμ§€ μ•Šμ•„μ•Όν•©λ‹ˆλ‹€"에 λŒ€ν•œ λΉ„ν™œμ„±ν™” 된 ν…ŒμŠ€νŠΈκ°€ μžˆμŠ΅λ‹ˆλ‹€.

@bestander , 방금 ν…ŒμŠ€νŠΈ

d#es5-ext -> es6-symbol#es5-ext -> es6-set#es5-ext -> es6-iterator#es5-ext -> es6-map#es5-ext -> es5-ext#es6-iterator -> es6-set#es6-iterator -> es6-weak-map#es6-iterator -> event-emitter#es5-ext -> d#es5-ext

κ·Έλž˜μ„œ μˆœμ§„ν•œ μž¬κ·€ 호좜 접근법이 λ‚˜μ™”μŠ΅λ‹ˆλ‹€ ...

예, μ•½κ°„μ˜ 쑰정이 ν•„μš”ν•˜λ‹€κ³  μƒκ°ν•˜μ§€λ§Œ 아이디어가 μ •ν™• ν•΄ λ³΄μž…λ‹ˆλ‹€.

0.27.5-1 싀을 μ‚¬μš©ν•˜λŠ” phantomjs-prebuilt λͺ¨λ“ˆ (쒅속성 μ˜μ‘΄μ„±)에 그런 λ¬Έμ œκ°€ μžˆμŠ΅λ‹ˆλ‹€.
이제 yarn install --production 전에 더미 yarn add phantomjs-prebuilt yarn install --production ν•©λ‹ˆλ‹€.

이것이 Yarn 1.3.2μ—μ„œ μ—¬μ „νžˆ 문제인 것 κ°™λ‹€κ³  λ§ν•˜κ²Œλ˜μ–΄ μœ κ°μž…λ‹ˆλ‹€.
Netlify의 λΉŒλ“œλŠ” Yarn 1.3.2λ₯Ό μ‚¬μš©ν•  λ•Œ μ‹€νŒ¨ν•˜μ§€λ§Œ Yarn 0.18.2μ—μ„œλŠ” μ„±κ³΅ν•©λ‹ˆλ‹€.
cannot find module 'are-we-there-yet' 및 ν”„λ‘œλ•μ…˜ ν”Œλž˜κ·Έ λ§ŒμžˆλŠ” λΉŒλ“œ 였λ₯˜.

@adamreisnz ,이 μŠ€λ ˆλ“œκ°€ λ„ˆλ¬΄ μ»€μ„œ λͺ¨λ“  문제λ₯Ό 좔적 ν•  수 μ—†μŠ΅λ‹ˆλ‹€.
μž¬ν˜„ 슀크립트둜 μƒˆλ‘œμš΄ 것을 ν‚€μšΈ 수 μžˆμŠ΅λ‹ˆκΉŒ?

@bestander μ™„λ£Œ, κ°μ‚¬ν•©λ‹ˆλ‹€.

μ—¬μ „νžˆ μž‘λ™ν•˜μ§€ μ•Šκ³  jq λ₯Ό μ„€μΉ˜ν•˜κ³  싢지 μ•Šμ€ μ‚¬λžŒμ€ μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

$ python -c "import json; p = json.loads(open('package.json').read()); del p['devDependencies']; open('package.json', 'w').write(json.dumps(p, indent=2));"

μ €λŠ” lerna monorepo의 μ–€ 1.17.3 및 λ…Έλ“œ v10.16.2 에 μžˆμŠ΅λ‹ˆλ‹€. μ—¬μ „νžˆ 같은 λ¬Έμ œμ— μ§λ©΄ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

저도 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.
λ‚˜λŠ” λ§Žμ€ μ˜μ‘΄μ„±μ„ 가지고 μžˆμ§€λ§Œ yarn install --production λ₯Ό μ‚¬μš©ν•˜λ©΄ 두 개의 λͺ¨λ“ˆ 만 μ„€μΉ˜λ©λ‹ˆλ‹€.
κ·ΈλŸ¬λ‚˜ μ£Όλͺ©ν• λ§Œν•œ 것은 @hannadrehman with Yarn workspaces 와 μœ μ‚¬ν•œ Lerna monorepo에 있으며, μ΄λŠ” 극단적 인 λ™μž‘μ„ μ„€λͺ… ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

원사 버전 : 1.22.0
λ…Έλ“œ : v12.16.1

npm install --production 은 μ™„λ²½ν•˜κ²Œ μž‘λ™ν•©λ‹ˆλ‹€.

@hannadrehman 은 문제의 ν”„λ‘œμ νŠΈκ°€ λͺ¨λ…Έ 레포 νŒ¨ν‚€μ§€μž…λ‹ˆκΉŒ?

@ TAnas0 κ³Ό 같은 문제

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