chromaui/chromatic-cli

Clearer Error Message

ottergeorge opened this issue · 0 comments

Hello
I've recently started using Chromatic and I've been getting errors when building components. The error build doesn't happen when building the app (using Vite, or with Storybook building). It only happens with Chromatic. Which is ok, but the error message is very unclear.

✖ Encountered 1 build error: failing with exit code 2

And then looking at the Chromatic UI, the error message is even more unclear:

Error: Evaluation failed: Error
    at J (https://633f28e05cf31bd2a8c08742-asczrljxfn.capture.chromatic.com/assets/Header.stories.2b1512bb.js:21:822)
    at xr (https://633f28e05cf31bd2a8c08742-asczrljxfn.capture.chromatic.com/assets/Header.stories.2b1512bb.js:30:884)
    at https://633f28e05cf31bd2a8c08742-asczrljxfn.capture.chromatic.com/assets/Header.stories.2b1512bb.js:39:525
    at eu (https://633f28e05cf31bd2a8c08742-asczrljxfn.capture.chromatic.com/assets/index.e64502d2.js:22:19494)
    at oo (https://633f28e05cf31bd2a8c08742-asczrljxfn.capture.chromatic.com/assets/index.e64502d2.js:24:1590)
    at ka (https://633f28e05cf31bd2a8c08742-asczrljxfn.capture.chromatic.com/assets/index.e64502d2.js:24:46034)
    at ya (https://633f28e05cf31bd2a8c08742-asczrljxfn.capture.chromatic.com/assets/index.e64502d2.js:24:39775)
    at yf (https://633f28e05cf31bd2a8c08742-asczrljxfn.capture.chromatic.com/assets/index.e64502d2.js:24:39706)
    at Qr (https://633f28e05cf31bd2a8c08742-asczrljxfn.capture.chromatic.com/assets/index.e64502d2.js:24:39566)
    at xi (https://633f28e05cf31bd2a8c08742-asczrljxfn.capture.chromatic.com/assets/index.e64502d2.js:24:35955)
    at ExecutionContext._evaluateInternal (/var/task/capture-v4/build/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:218:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async ExecutionContext.evaluate (/var/task/capture-v4/build/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:107:16)
    at async /var/task/capture-v4/build/bundle.js:703183:7
    at async NavigatorWatcher2.waitForIdle (/var/task/capture-v4/build/bundle.js:673191:9)
    at async PuppeteerRenderer.renderSpec (/var/task/capture-v4/build/bundle.js:703144:25)
    at async PuppeteerRenderer.renderSnapshot (/var/task/capture-v4/build/bundle.js:703047:21)
    at async PuppeteerRenderer.captureSpecs (/var/task/capture-v4/build/bundle.js:702996:18)
    at async PuppeteerRenderer.executeWithCallback (/var/task/capture-v4/build/bundle.js:703239:14)

Would be nice if the error messages where a little more specific on why the fail occurred.