codestates / codestates/BanThing

[Error Handling] next.js 에서 환경변수 설정 시 에러발생

Open
#169 0 comments 0 reactions 1 assignee Claimed by @greenheadHQ View on GitHub
client error solved
Dominant language
TypeScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

### 어떤 에러인가요?
> 아래와 같이 환경변수를 설정하니 지도 API가 불러와지지 않았고 ,서버로의 연결도 되지 않았습니다.
스크린샷 2022-02-24 오후 3 03 18

### 에러 핸들링 방법
Next.js에서는 환경변수명은 앞에 `NEXT_PUBLIC`이 명시되어야 합니다. 아래와 같이 작성해주니 정상적으로 동작하였습니다.
스크린샷 2022-02-24 오후 3 06 10

### 에러 핸들링을 위해 참고한 레퍼런스 링크
[공식문서](https://nextjs.org/docs/basic-features/environment-variables)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.