[Error] Amplify 배포 에러 Could not initialize categories for 'dev': auth headless is missing the following inputParams userPoolId, webClientId, nativeClientId

이경은·2022년 11월 11일
1

❌ Error

amplify에서 앱을 배포하려고 하는데, 아래와 같은 에러가 발생했다. 아래의 파라미터가 없다는 메시지였다.

Could not initialize categories for 'dev': auth headless is missing the following inputParams userPoolId, webClientId, nativeClientId

📌 원인

이 에러는 amplify import auth를 사용하면 발생하게 됩니다. amplify auth를 사용하는 방법은 몇 개가 있는데, 나는 그 중에 기존에 만들어져 있는 정보를 가져다 쓰는 방법을 택했고, 이 방법에서 문제가 발생하는 것이었다.

⚡ 해결

Amplify에서 Environment variables 에 들어가서 환경 변수를 설정해주면 된다. 필요한 파라미터들을 추가하고 값을 넣어주고 다시 배포하면 에러가 해결된다.
스택 오버플로우에서는 다른 변수도 더 추가해야 된다고 되어 있었지만, 여기에서는 에러 메시지에 나온 것들만 추가했다.

AMPLIFY_NATIVECLIENT_ID
AMPLIFY_USERPOOL_ID
AMPLIFY_WEBCLIENT_ID


참조

https://github.com/aws-amplify/amplify-hosting/issues/1271

https://docs.amplify.aws/cli/auth/import/#unlink-an-existing-cognito-user-pool-or-identity-pool

profile
Web Developer

0개의 댓글