0

Everything works great until I actually try to build the site and deploy it. It looks like I have a self-referential variable, but I can’t figure out what it could be for the life of me and this error message isn’t giving me any clues:

node:internal/child_process/serialization:159
const string = JSONStringify(message) + ‘\n’;
^

TypeError: Converting circular structure to JSON
–> starting at object with constructor ‘Socket’
| property ‘_httpMessage’ -> object with constructor ‘ClientRequest’
— property ‘socket’ closes the circle
at stringify (<anonymous>)
at writeChannelMessage (node:internal/child_process/serialization:159:20)
at process.target._send (node:internal/child_process:840:17)
at process.target.send (node:internal/child_process:740:19)
at reportError (C:\Users\user\OneDrive\Documents\GitHub\ecommerce2\node_modules\next\dist\compiled\jest-worker\processChild.js:1:1993)
at reportClientError (C:\Users\user\OneDrive\Documents\GitHub\ecommerce2\node_modules\next\dist\compiled\jest-worker\processChild.js:1:1669)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
node:internal/child_process/serialization:159
const string = JSONStringify(message) + ‘\n’;
^

TypeError: Converting circular structure to JSON
–> starting at object with constructor ‘Socket’
| property ‘_httpMessage’ -> object with constructor ‘ClientRequest’
— property ‘socket’ closes the circle
at stringify (<anonymous>)
at writeChannelMessage (node:internal/child_process/serialization:159:20)
at process.target._send (node:internal/child_process:840:17)
at process.target.send (node:internal/child_process:740:19)
at reportError (C:\Users\user\OneDrive\Documents\GitHub\ecommerce2\node_modules\next\dist\compiled\jest-worker\processChild.js:1:1993)
at reportClientError (C:\Users\user\OneDrive\Documents\GitHub\ecommerce2\node_modules\next\dist\compiled\jest-worker\processChild.js:1:1669)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
node:internal/child_process/serialization:159
const string = JSONStringify(message) + ‘\n’;
^

TypeError: Converting circular structure to JSON
–> starting at object with constructor ‘Socket’
| property ‘_httpMessage’ -> object with constructor ‘ClientRequest’
— property ‘socket’ closes the circle
at stringify (<anonymous>)
at writeChannelMessage (node:internal/child_process/serialization:159:20)
at process.target._send (node:internal/child_process:840:17)
at process.target.send (node:internal/child_process:740:19)
at reportError (C:\Users\user\OneDrive\Documents\GitHub\ecommerce2\node_modules\next\dist\compiled\jest-worker\processChild.js:1:1993)
at reportClientError (C:\Users\user\OneDrive\Documents\GitHub\ecommerce2\node_modules\next\dist\compiled\jest-worker\processChild.js:1:1669)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
node:internal/child_process/serialization:159
const string = JSONStringify(message) + ‘\n’;
^

TypeError: Converting circular structure to JSON
–> starting at object with constructor ‘Socket’
| property ‘_httpMessage’ -> object with constructor ‘ClientRequest’
— property ‘socket’ closes the circle
at stringify (<anonymous>)
at writeChannelMessage (node:internal/child_process/serialization:159:20)
at process.target._send (node:internal/child_process:840:17)
at process.target.send (node:internal/child_process:740:19)
at reportError (C:\Users\user\OneDrive\Documents\GitHub\ecommerce2\node_modules\next\dist\compiled\jest-worker\processChild.js:1:1993)
at reportClientError (C:\Users\user\OneDrive\Documents\GitHub\ecommerce2\node_modules\next\dist\compiled\jest-worker\processChild.js:1:1669)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

> Build error occurred
Error: Call retries were exceeded
at ChildProcessWorker.initialize (C:\Users\user\OneDrive\Documents\GitHub\ecommerce2\node_modules\next\dist\compiled\jest-worker\index.js:1:12037)
at ChildProcessWorker._onExit (C:\Users\user\OneDrive\Documents\GitHub\ecommerce2\node_modules\next\dist\compiled\jest-worker\index.js:1:12975)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.emit (node:domain:489:12)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
type: ‘WorkerError’
}

Basir Unselected an answer October 13, 2022