storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.49k stars 9.29k forks source link

[Bug]: Cypress fails on the latest version to run due to missing dep-pre-bundle #25194

Closed michaelschomburg closed 10 months ago

michaelschomburg commented 10 months ago

Describe the bug

I am receiving the following output as soon as I am running "cy:run": "cypress run --component --browser ${CYPRESS_BROWSER:-electron}",

`DevTools listening on ws://127.0.0.1:52019/devtools/browser/8252e05b-bcec-467d-9389-978a25b65ee4 2023-12-12 14:03:56.585 Cypress[76547:854847] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES. Forced re-optimization of dependencies

====================================================================================================

(Run Starting)

┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 13.6.0 │ │ Browser: Electron 114 (headless) │ │ Node Version: v16.17.1 (/Users/SchomM01_1/.nvm/versions/node/v16.17.1/bin/node) │ │ Specs: 9 found (api/index.spec.ts, helpers/array.spec.js, helpers/date.spec.ts, helpe │ │ rs/string.spec.ts, utils/tokenRefreshUtils.spec.ts, api/interceptors/tokenRefr │ │ eshInterceptor.spec.ts, components/BottomSheet/BottomSheet.spec.ts, components │ │ /InputRadio/InputRadio...) │ │ Searched: ./resources/js/*/!(.jest).spec.[jt]s │ └────────────────────────────────────────────────────────────────────────────────────────────────┘

────────────────────────────────────────────────────────────────────────────────────────────────────

Running: api/index.spec.ts (1 of 9) Warning: The following browser launch options were provided but are not supported by electron

Your configFile threw an error from: cypress.config.js

We stopped running your tests because your config file crashed.

Error: Build failed with 1 error: node_modules/esbuild/lib/main.js:1373:21: ERROR: [plugin: vite:dep-pre-bundle] Missing "./preview" specifier in "@storybook/vue3" package at failureErrorWithLog (/Users/SchomM01_1/projects/studydrive/node_modules/esbuild/lib/main.js:1649:15) at /Users/SchomM01_1/projects/studydrive/node_modules/esbuild/lib/main.js:1058:25 at /Users/SchomM01_1/projects/studydrive/node_modules/esbuild/lib/main.js:1525:9 at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5)

1) An uncaught error was detected outside of a test

0 passing (223ms) 1 failing

1) An uncaught error was detected outside of a test: TypeError: The following error originated from your test code, not from Cypress.

Failed to fetch dynamically imported module: http://localhost:5173/__cypress/src/tests-frontend/support/component.ts

When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.

Cypress could not associate this error to any specific test.

We dynamically generated a new test to display this failure.`

To Reproduce

No response

System

No response

Additional context

This appeared after I updated the following packages and addons to 7.6.4

"@storybook/addon-a11y": "^7.5.3", "@storybook/addon-actions": "^7.5.3", "@storybook/addon-essentials": "^7.5.3", "@storybook/addon-interactions": "^7.5.3", "@storybook/addon-links": "^7.5.3", "@storybook/addon-mdx-gfm": "^7.6.4", "@storybook/addon-measure": "^7.5.3", "@storybook/addon-storysource": "^7.5.3", "@storybook/blocks": "^7.5.3", "@storybook/testing-vue3": "^1.0.0", "@storybook/vue3-vite": "^7.5.3", "storybook": "^7.5.3",

shilman commented 10 months ago

Closing this as duplicate to https://github.com/storybookjs/testing-vue3/issues/14 and I'll follow up there