이제 npm publish 명령어를 사용해 이 패키지를 배포해봅시다. 배포 과정에서 OTP 코드도 입력해야 합니다. 하지만 에러가 발생할 것입니다.
콘솔
$ npm publish
npm notice
// notice 생략
npm notice You must provide a one-time pass. You can provide one using the "--otp" flag.
This operation requires a one-time password.
Enter OTP: [OTP 코드 입력]
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/npmtest - You do not have permission to publish "npmtest". Are you logged in as the correct user?
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\speak\AppData\Roaming\npm-cache\_logs\2025-11-24T17_52_25_852Z-debug.log