Cli: npm κ²Œμ‹œ 404 찾을 수 μ—†μŒ - PUT

에 λ§Œλ“  2020λ…„ 08μ›” 07일  Β·  3μ½”λ©˜νŠΈ  Β·  좜처: npm/cli

κ°€μž₯ κ°€κΉŒμš΄ λ¬Έμ œλŠ” #1626μ΄μ§€λ§Œ npm을 μ‚¬μš©ν•˜μ—¬ νŒ¨ν‚€μ§€λ₯Ό κ°€μ Έμ˜€λŠ” 것에 κ΄€ν•œ 것이며 λŒ€λΆ€λΆ„μ˜ μ‚¬μš©μžμ—κ²Œ ν•΄κ²°λœ κ²ƒμ²˜λŸΌ λ³΄μž…λ‹ˆλ‹€.
μ—¬κΈ° CI의 npm 퍼블리싱 νŒ¨ν‚€μ§€μ— λŒ€ν•œ λ‚΄μš©μ΄λ©° ν˜„μž¬λ‘œμ„œλŠ” ν•΄κ²°λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€.

ν˜„μž¬ 행동:

https://framagit.org/1000i100/g1lien/-/jobs/1072053

$ npm publish
[...]
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/g1link - Not found
npm ERR! 404 
npm ERR! 404  '[email protected]' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
[...]

μ˜ˆμƒλ˜λŠ” λ™μž‘:

npm_token 인증을 μ‚¬μš©ν•˜μ—¬ gitlab-CI의 dockerμ—μ„œ λ‚΄ νŒ¨ν‚€μ§€λ₯Ό μ„±κ³΅μ μœΌλ‘œ κ²Œμ‹œν–ˆμŠ΅λ‹ˆλ‹€.
(μ–΄μ œ npm λ‘œκ·ΈμΈμ„ μ‚¬μš©ν•˜λŠ” λž©ν†±μ—μ„œλŠ” μž‘λ™ν•˜μ§€λ§Œ CI의 npm_tokenμ—μ„œλŠ” μž‘λ™ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€).

μž¬ν˜„ 단계:

μ „. 행동을 μž¬ν˜„ν•˜λŠ” 단계:

  1. 포크: https://framagit.org/1000i100/g1lien
  2. νŒ¨ν‚€μ§€ 이름을 λ³€κ²½ν•˜κ³  npm 토큰을 μΆ”κ°€ν•˜μ‹­μ‹œμ˜€.
  3. CIκ°€ ν™œμ„±ν™”λœ gitlab의 νƒœκ·Έλ‘œ ν‘Έμ‹œν•©λ‹ˆλ‹€.

문제λ₯Ό μž¬ν˜„ν•΄μ•Ό ν•©λ‹ˆλ‹€.

ν™˜κ²½:

https://framagit.org/1000i100/g1lien/-/blob/master/.gitlab-ci.yml#L5
https://framagit.org/1000i100/g1lien/-/jobs/1072052#L17

  • OS: 이미지가 μžˆλŠ” gitlab의 Docker: node:current
  • λ…Έλ“œ: v14.7.0
  • NPM: 6.14.7

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

λ‚˜λŠ” μƒˆ μ»΄ν“¨ν„°μ—μ„œ npm publish ν•˜λ €κ³  ν–ˆκ³  λ™μΌν•œ 예기치 μ•Šμ€ 404λ₯Ό μ–»μ—ˆμŠ΅λ‹ˆλ‹€. 제 κ²½μš°μ—λŠ” npm login 둜 ν•΄κ²°λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 401이 개인 νŒ¨ν‚€μ§€μ˜ 쑴재λ₯Ό "유좜"ν•  수 μžˆλ‹€λŠ” 것을 μ΄ν•΄ν•˜μ§€λ§Œ CLIκ°€ λ¨Όμ € λ‚΄κ°€ μΈμ¦λ˜μ—ˆλŠ”μ§€ ν™•μΈν•˜κ³  더 μ μ ˆν•œ 였λ₯˜λ‘œ 응닡할 것이라고 μƒκ°ν•©λ‹ˆλ‹€.

λ‹€μŒμ€ npm publish 전에 npm login npm publish λ₯Ό μ‹œλ„ν–ˆμ„ λ•Œ 둜그의 κ΄€λ ¨ λΆ€λΆ„μž…λ‹ˆλ‹€.

19 verbose stack Error: 404 Not Found - PUT https://registry.npmjs.org/mock-fs - Not found
19 verbose stack     at /Users/tschaub/.nvm/versions/node/v14.8.0/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:117:15
19 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:93:5)
20 verbose statusCode 404
21 verbose pkgid [email protected]
22 verbose cwd /Users/tschaub/projects/mock-fs
23 verbose Darwin 19.6.0
24 verbose argv "/Users/tschaub/.nvm/versions/node/v14.8.0/bin/node" "/Users/tschaub/.nvm/versions/node/v14.8.0/bin/npm" "publish"
25 verbose node v14.8.0
26 verbose npm  v6.14.8
27 error code E404
28 error 404 Not Found - PUT https://registry.npmjs.org/mock-fs - Not found
29 error 404
30 error 404 '[email protected]' is not in the npm registry.
31 error 404 You should bug the author to publish it (or use the name yourself!)
32 error 404 Note that you can also install from a
33 error 404 tarball, folder, http url, or git url.
34 verbose exit [ 1, true ]

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

같은 였λ₯˜μž…λ‹ˆλ‹€.

λ§ˆμ§€λ§‰ 릴리슀 30.07이 μ„±κ³΅ν–ˆμŠ΅λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ 11.08 μ΄ν›„λ‘œ κ²Œμ‹œν•  λ•Œ λ‹€μŒ 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆλ‹€.
2020-08-13T09:56:54.1669946Z 18 http κ°€μ Έμ˜€κΈ° PUT 404 https://registry.npmjs.org/@aurigma%2fui-framework 5611ms
2020-08-13T09:56:54.1670114Z 19 μžμ„Έν•œ μŠ€νƒ 였λ₯˜: 404 찾을 수 μ—†μŒ - PUT https://registry.npmjs.org/@aurigma%2fui-framework - 찾을 수 μ—†μŒ

λ‚˜λŠ” μƒˆ μ»΄ν“¨ν„°μ—μ„œ npm publish ν•˜λ €κ³  ν–ˆκ³  λ™μΌν•œ 예기치 μ•Šμ€ 404λ₯Ό μ–»μ—ˆμŠ΅λ‹ˆλ‹€. 제 κ²½μš°μ—λŠ” npm login 둜 ν•΄κ²°λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 401이 개인 νŒ¨ν‚€μ§€μ˜ 쑴재λ₯Ό "유좜"ν•  수 μžˆλ‹€λŠ” 것을 μ΄ν•΄ν•˜μ§€λ§Œ CLIκ°€ λ¨Όμ € λ‚΄κ°€ μΈμ¦λ˜μ—ˆλŠ”μ§€ ν™•μΈν•˜κ³  더 μ μ ˆν•œ 였λ₯˜λ‘œ 응닡할 것이라고 μƒκ°ν•©λ‹ˆλ‹€.

λ‹€μŒμ€ npm publish 전에 npm login npm publish λ₯Ό μ‹œλ„ν–ˆμ„ λ•Œ 둜그의 κ΄€λ ¨ λΆ€λΆ„μž…λ‹ˆλ‹€.

19 verbose stack Error: 404 Not Found - PUT https://registry.npmjs.org/mock-fs - Not found
19 verbose stack     at /Users/tschaub/.nvm/versions/node/v14.8.0/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:117:15
19 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:93:5)
20 verbose statusCode 404
21 verbose pkgid [email protected]
22 verbose cwd /Users/tschaub/projects/mock-fs
23 verbose Darwin 19.6.0
24 verbose argv "/Users/tschaub/.nvm/versions/node/v14.8.0/bin/node" "/Users/tschaub/.nvm/versions/node/v14.8.0/bin/npm" "publish"
25 verbose node v14.8.0
26 verbose npm  v6.14.8
27 error code E404
28 error 404 Not Found - PUT https://registry.npmjs.org/mock-fs - Not found
29 error 404
30 error 404 '[email protected]' is not in the npm registry.
31 error 404 You should bug the author to publish it (or use the name yourself!)
32 error 404 Note that you can also install from a
33 error 404 tarball, folder, http url, or git url.
34 verbose exit [ 1, true ]

예, npm login 이(κ°€) 도움이 λ©λ‹ˆλ‹€. λ©°μΉ  전에 λ‚˜λ„ 이것을 λ°œκ²¬ν–ˆλ‹€. κ·ΈλŸ¬λ‚˜ μ—¬μ „νžˆ λ‚΄κ°€ μ™œ λ‹€μ‹œ μŠΉμΈν•΄μ•Όν–ˆλŠ”μ§€ λͺ…ν™•ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.
Npm은 였λ₯˜ λ©”μ‹œμ§€λ₯Ό κ°œμ„ ν•΄μ•Ό ν•©λ‹ˆλ‹€.

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