npm ci, bluebird swallowed stack trace and produced JSON circular structure error


(Beknar Askarov) #1

What I Wanted to Do

Build my multipackage project using lerna in gitlab runner
Run npm ci

What Happened Instead

 TypeError: Converting circular structure to JSON
at JSON.stringify (<anonymous>)
at process.target._send (internal/child_process.js:715:23)
at process.target.send (internal/child_process.js:626:19)
at callback (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/child/index.js:32:17)
at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
at Promise.errorAdapter [as _rejectionHandler0] (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/nodeify.js:35:34)
at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:566:21)
at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:689:18)
at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:694:18)
at tryOnImmediate (timers.js:665:5)
at processImmediate (timers.js:647:5)

Reproduction Steps

Details

Seems like some error was about to come out but JSON.stringify expception swallowed it and produced circular structure error

Platform Info

docker image node 10

$ npm --versions
6.4.1
$ node -p process.platform
linux
$node -v
10.11.0