티스토리 뷰
문제점
- Next.js project 에서 정적 배포를 하기 위해 next export 시도함.
- 에러 발생
- Error: Image Optimization using Next.js' default loader is not compatible with
next export
. - Possible solutions:
- Use
next start
to run a server, which includes the Image Optimization API. - Use any provider which supports Image Optimization (like Vercel).
- Configure a third-party loader in
next.config.js
. - Use the
loader
prop fornext/image
.
- Use
- Error: Image Optimization using Next.js' default loader is not compatible with
해결과정
- Vercel이 아닌 AWS 배포 예정이어서 3번 방법인 third-party loader 설정 시도
- next-optimized-images 설치, config 설정 변경 후 다시 export
- 에러 발생
- TypeError: unsupported file type: undefined (file: undefined)
- 전체 이미지가 아니라 일부 이미지에서만 이렇게 발생했고 ImageSize 관련 에러 메시지가 나오지만 자세히 안나오고 디버그 모드로도 안 찍힘.
- built-in Loaders 에서 loader 변경해서 시도함.
- imgix → 똑같은 에러 메시지로 실패
- akamai → 성공
// next.config.js
moduel.exports = {
images: {
loader: 'akamai',
path: '/',
}
}
반응형
'JavaScript & TypeScript' 카테고리의 다른 글
브라우저, JS 흐름 정리 메모 (2) | 2022.05.22 |
---|---|
Udemy 클린코드 JS 강의 정리 (1) | 2022.01.06 |
TypeORM synchronize true 시 이전 table 까지 생성 문제 (2) | 2021.12.26 |
axios (0) | 2020.12.13 |
react-router-dom (0) | 2020.12.13 |
링크
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 이펙티브자바 아이템59
- 가상 면접 사례로 배우는 대규모 시스템 설계 기초
- 백기선 스터디
- dreamcoding
- Spring Security
- 이펙티브자바
- JS 딥다이브
- 백준
- JPA 연관관계 매핑
- 패스트캠퍼스 컴퓨터공학 완주반
- http
- 킹수빈닷컴
- 집 구하기
- js promise
- 모던자바스크립트
- HTTP 완벽 가이드
- 드림코딩
- GCP
- 김영한 JPA
- 이펙티브자바 아이템60
- js api
- HTTP 완벽가이드
- 김영한 http
- 프로그래머스 SQL
- java
- 프로그래머스
- js array
- REST API
- BOJ
- 이펙티브자바 스터디
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
글 보관함