728x90
반응형
-v 9.5.1 테스트 완료
8.19.3 이상의 버전은 .npmrc 인증 구성이 변경되었습니다.
1. 에러 코드
NPM ERR! Code ERR_INVALID_AUTH
npm ERR! Invalid auth configuration found: `_auth` must be renamed to `//r2ware-rd.synology.me:8082/repository/npm_hosted/:_auth` in project config
npm ERR! Please run `npm config fix` to repair your configuration.`
잘못된 인증 구성으로서 프로젝트의 npm 설정을 수정해야 한다.
2. 수정 방법
잘못된 이전 .npmrc 구성 보안성 증가된 이후 .npmrc 구성
_auth=MY_AUTH_KEY | |
registry=MY_REGISTRY_URL | //MY_REGISTRY_URL:_auth="MY_AUTH_KEY" |
- 예시(npm_group, npm_hosted)
registry=https://somewhere-else.com/npm_group
registry=https://somewhere-else.com/npm_hosted
모두 인증 적용 //somewhere-else.com/:_auth=MYTOKEN
npm_group 인증 적용 | //somewhere-else.com/npm_group/:_auth=MYTOKEN1 |
npm_hosted 인증 적용 | //somewhere-else.com/npm_hosted/:_auth=MYTOKEN2 |
3. 이유
특정 레지스트리로 범위를 지정하고 인증해야 잘못된 호스트에 대해서는 자격 증명을 보내지조차 않음.
또한 npm publish <설정 내용 작성>하는 것 보다 .npmrc 파일을 사용하는 것이 더 안전함.
- Breaking Change
.npmrc에 특정 Registry로 범위가 지정되지 않은 인증 관련 설정의 존재는 더 이상 지원되지 않으며 오류가 발생합니다.
https://github.blog/changelog/2022-10-24-npm-v9-0-0-released/
728x90
반응형
'ETC' 카테고리의 다른 글
JDBC Select문만 실행하는 방법 (0) | 2024.05.27 |
---|---|
HTTP-SERVER (0) | 2023.05.23 |
View Transitions API (0) | 2023.05.22 |
SVN - Eclipse (0) | 2022.12.27 |
Eclipse jar 배포 및 Linux Character Set, ClassPath, Lib 설정 (0) | 2022.06.15 |