🤍 전 강의 25% 할인 중 🤍

2024년 상반기를 돌아보고 하반기에도 함께 성장해요!
인프런이 준비한 25% 할인 받으러 가기 >>

  • 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

next build시 에러가 발생합니다.

21.08.23 09:26 작성 조회수 1.81k

0

next build로 빌드를 하는 과정에서 다음과 같은 에러가 발생하였습니다.

TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Node'
    |     property 'local' -> object with constructor 'Node'
    --- property 'parent' closes the circle
    at stringify (<anonymous>)
    at writeChannelMessage (node:internal/child_process/serialization:120:20)
    at process.target._send (node:internal/child_process:822:17)
    at process.target.send (node:internal/child_process:722:19)
    at reportError (/Users/hongjunhyeok/Desktop/Github/Hlog/client/node_modules/jest-worker/build/workers/processChild.js:87:11)
    at reportClientError (/Users/hongjunhyeok/Desktop/Github/Hlog/client/node_modules/jest-worker/build/workers/processChild.js:71:10)
node:internal/child_process/serialization:120
    const string = JSONStringify(message) + '\n';
                   ^

TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Node'
    |     property 'local' -> object with constructor 'Node'
    --- property 'parent' closes the circle
    at stringify (<anonymous>)
    at writeChannelMessage (node:internal/child_process/serialization:120:20)
    at process.target._send (node:internal/child_process:822:17)
    at process.target.send (node:internal/child_process:722:19)
    at reportError (/Users/hongjunhyeok/Desktop/Github/Hlog/client/node_modules/jest-worker/build/workers/processChild.js:87:11)
    at reportClientError (/Users/hongjunhyeok/Desktop/Github/Hlog/client/node_modules/jest-worker/build/workers/processChild.js:71:10)

> Build error occurred
Error: Call retries were exceeded
    at ChildProcessWorker.initialize (/Users/hongjunhyeok/Desktop/Github/Hlog/client/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)
    at ChildProcessWorker._onExit (/Users/hongjunhyeok/Desktop/Github/Hlog/client/node_modules/jest-worker/build/workers/ChildProcessWorker.js:275:12)
    at ChildProcess.emit (node:events:369:20)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) {
  type: 'WorkerError'
}



{
  "scripts": {
    "dev": "next -p 3060",
    "build": "next build"
  },
  "dependencies": {
    "@emotion/core": "^11.0.0",
    "@emotion/react": "^11.4.0",
    "@emotion/styled": "^11.3.0",
    "@types/uuid": "^8.3.1",
    "autosize": "^5.0.1",
    "axios": "^0.21.1",
    "babel-eslint": "^10.1.0",
    "date-fns": "^2.23.0",
    "emotion-reset": "^3.0.1",
    "eslint-config-prettier": "^8.3.0",
    "immer": "^9.0.5",
    "marked": "^2.1.3",
    "next": "^11.0.1",
    "next-cookies": "^2.0.3",
    "next-redux-wrapper": "^7.0.2",
    "react": "^17.0.2",
    "react-cookies": "^0.1.1",
    "react-dom": "^17.0.2",
    "react-icons": "^4.2.0",
    "react-redux": "^7.2.4",
    "react-toastify": "^7.0.4",
    "redux": "^4.1.1",
    "redux-saga": "^1.1.3",
    "shortid": "^2.2.16",
    "typesafe-actions": "^5.1.0",
    "uuid": "^8.3.2"
  },
  "devDependencies": {
    "@types/autosize": "^4.0.0",
    "@types/faker": "^5.5.7",
    "@types/marked": "^2.0.4",
    "@types/react-cookies": "^0.1.0",
    "@types/react-dom": "^17.0.9",
    "@types/shortid": "^0.0.29",
    "@typescript-eslint/eslint-plugin": "^4.29.2",
    "@typescript-eslint/parser": "^4.29.2",
    "eslint": "^7.32.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-config-next": "^11.1.0",
    "eslint-plugin-prettier": "^3.4.1",
    "faker": "^5.5.3",
    "redux-devtools-extension": "^2.13.9",
    "typescript": "^4.3.5"
  }
}



오류를 해결할려고 하는데 어디서 이런 오류가 발생하는지도 모르겠어서 어떻게 해야할지 모르겠네요 ㅠㅠ 혹시 버전문제 같은건가요?

답변 1

답변을 작성해보세요.

0

지금 이것만 보고는 에러를 해결하기 어렵습니다. 저것은 소스 코드중에 import export 관계가 잘못 되어있으면 발생하는 에러입니다. 파일 하나하나를 체크해봐야 합니다.

foxbox r님의 프로필

foxbox r

질문자

2021.08.23

하나하나 살펴봤지만 저한테는 잘못된 관계가 보이지않네요... 어떤 부분에서 import export에러가 발생할 수 있을까요?

파일 중 하나만 발생해도 그렇습니다. 그래서 저런 에러가 해결이 매우 어렵습니다.

https://github.com/vercel/next.js/issues/27841

https://github.com/vercel/next.js/issues/26272

마지막 링크 들어가서 보면 next lint 했을 때 에러 해결하니 됐다고 하네요.

채널톡 아이콘