An error occurred while trying to build a project created with nextjs.
I expected it to be built and executed normally, but I'm holding back because of an error such as the following code.
The error that occurred during "next build" is as follows:
What is the reason for this error and how can we solve it?
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'
}
My pacakage.json
{
"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"
}
}