2025년 2월 26일 수요일

[npm-cli] npm warn config init.author.name Use `--init-author-name` instead 출력 이유 확인


증상:


npm 명령 수행 시 아래와 같은 경고 문구 표시

npm warn config init.author.name Use `--init-author-name` instead.
npm warn config init.author.email Use `--init-author-email` instead.


원인:


npm 설정에 init.author.name 값은 init-author-name 로 변경됨

관련 github issue #6642


해결:


값 설정


npm config set init-author-name <name>
npm config set init-author-email <email>

기존키 삭제


.npmrc 파일에 init.author.name, init.author.email 값 삭제
  • per-project config file (/path/to/my/project/.npmrc)
  • per-user config file (~/.npmrc)
  • global config file ($PREFIX/etc/npmrc)
  • npm builtin config file (/path/to/npm/npmrc)



참고

init-author-name 과 init-author-email 은 npm init 과정에서 package.json 에 author 값을 설정하는데 사용됨





댓글 없음:

댓글 쓰기