μ€ννλ κ²½μ° 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
@ 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
μ½λκ° ν¨ν€μ§λ₯Ό κ²μνλ λ°©λ²μ λΆμμ© μΌλΏμ
λλ€.
κ·Έλνλ₯Ό ν λ² κ±Έμ΄ κ° ν κ°μμ±μ μ ννκΈ° μν΄ μΆκ° ν¨μ€λ₯Ό μΆκ°νμ§ μκ³ μ΄ μμ μ μννλ μ’μ λ°©λ²μ μ°ΎμΌλ €κ³ νμ΅λλ€. κ°μμ±μ λ³λμ λ¨κ³λ‘ λλλ κ²μ΄ νμ©λλμ§ νμ€νμ§ μμ΅λλ€ ..?
λͺ κ°μ§ ν₯λ―Έλ‘μ΄ κ²½μ°λ μμ§λ§ κ°μμ±μ μ λλ‘ ν΄κ²°νλ κ²λ§μ΄ μλλλ€.
μ΄ κ²½μ° 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
μ μ κ±°νκ³ μλν΄ μ£Όμκ² μ΅λκΉ?
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
) μ¬μ©νλ κ²μΌλ‘ 보μ΄μ§ μμ΅λλ€. κ·Έκ² νλ‘λμ
μ μ€μΉλμ§ μμ μ΄μ μΌκΉμ?
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 λ€μμ μλνκ³ μλ μ€μ λλ€. μ€μ λ¬Έμ λ₯Ό νμ ν΄μΌν©λλ€.
@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 λ₯Ό μ¬μ©νλ κ²μ΄ μ’μ΅λλ€.
λ§μ μΆλ ₯ λΌμΈμΌλ‘ λ§€μ° μ€μ©μ
μ΄μ μ€νΈμ μ€μ§νκ² μ΅λλ€
@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 κ³Ό κ°μ λ¬Έμ
κ°μ₯ μ μ©ν λκΈ
μλ νμΈμ μ¬λ¬λΆ,μ΄ λ¬Έμ κ° κ½€ μ€λ«λμ λ°μν΄μ μ£μ‘ν©λλ€.
μ΄ λ¬Έμ λ₯Ό λ μμ μκ² ν λΉνκ³ μ΄μ λ μ°μ μμκ° λμΌλ―λ‘ ν΄μΌ λμ ν΄κ²°νλ €κ³ λ Έλ ₯ν κ²μ λλ€.
격리 λ λΈλ μ΄νΉ ν μ€νΈ λλ μμ (μ΄μμ μΌλ‘)μ΄μλ λμλ§ λ° ν보λ λ§€μ° νμν©λλ€.