inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

React 기반 Gatsby로 기술 블로그 개발하기

develop 은 되는데 build 환경에서의 오류

314

작성자 없음

작성한 질문수 0

1

Building static HTML failed for path "/main/postItem/"

 

See our docs page for more info on this error: https://gatsby.dev/debug-html

 

 

  19 |   categories,

  20 |   summary,

> 21 |   thumbnail: { publicURL },

     |                ^

  22 |   link,

  23 | }) => {

  24 |   return (

 

 

  WebpackError: TypeError: Cannot read properties of undefined (reading 'publicURL')

  

  - postItem.tsx:21 

    gatsby-starter-default/src/pages/main/postItem.tsx:21:16

  

  - inheritsLoose.js:5 

    [gatsby-starter-default]/[@babel]/runtime/helpers/inheritsLoose.js:5:1

  

  - emotion-is-prop-valid.esm.js:15 

    [gatsby-starter-default]/[@emotion]/is-prop-valid/dist/emotion-is-prop-valid.esm.js:15:1

  

  - inheritsLoose.js:7 

    [gatsby-starter-default]/[@babel]/runtime/helpers/inheritsLoose.js:7:1

  

  - static-entry.js:294 

    gatsby-starter-default/.cache/static-entry.js:294:22

  

  - history.js:49 

    [gatsby-starter-default]/[@gatsbyjs]/reach-router/es/lib/history.js:49:6

  

 

 

publicUrl 이 없으면 build 환경에서 잘 동작합니다. 

저 구문만 있으면 build 환경에서 돌아가지 않습니다..!

 

https://github.com/urther/example

레포 주소 첨부합니다 ㅠㅠ 

8000/graphql 에서 publicUrl 정상 동작하는것도 확인했습니다! 

blog Gatsby

답변 1

0

주현도

안녕하세요, 박민지님!

레포를 확인해보니 publicURL 대신 gatsbyImageData 프로퍼티가 들어가있네요!

혹시 문제 해결하셨는지 알 수 있을까요?

쿼리오류 Field "thumbnail" must not have a selection...

1

852

1

타입스크립트를 설정할 때 jsxPragma 옵션을 뺀 이유는 무엇인가요?

1

585

1

마지막 배포 부분 질문드립니다!

1

617

1

'[username]/[username].github.io' -> 'username/reponame'

0

337

0

IntersectionObserver deploy( gatsby build) 시 오류(자답)

1

387

1

PostHead.tsx BackgroundImage 동작오류(자답)

1

288

0

19강 인피니티 스크롤 IntersectionObserver 코드 위치 수정이 필요합니다.

1

402

1

썸네일 이미지 제작 및 학습 방법 관련 문의

1

436

1

배포 후 포스트 업로드 방법

1

378

1

배포 질문이요!

1

512

1

gatsby develop 오류

1

931

1

깃허브 레퍼지토리 질문드려요

1

339

1

특정 게시글을 클릭하여 상세 페이지로 넘어가는 과정과 SPA에 관한 질문

1

280

1

Unhandled Runtime Error 가 뜹니다

0

501

2

sign in with GitHub 클릭 시

1

390

3

동작 반복 시 오류

1

349

2

const BackgroundImage 질문

1

209

1

오타 문의

1

299

2

Props로 받아 포스트 데이터 출력하기가 안됩니다.

1

199

1

index.tsx allMarkdownRemark 에러..

0

591

2

스네이크 케이스로 변수명을 짓는 이유

1

248

1

'Tagged Template Literal 방식을 통해 정의한 CSS 적용 방법'에서 발생하는 문제

3

343

2

상단 이미지를 썸네일 사용하지않고 다른 이미지를 쓰고싶습니다

1

279

1

여기까지 했는데 runtime 에러가 발생합니다

2

277

1