tests run on old output files on next standalone #137

Closed
opened 2026-06-25 08:45:15 +00:00 by KattisLej · 0 comments
KattisLej commented 2026-06-25 08:45:15 +00:00 (Migrated from github.com)

Describe the bug

When running the test script a test can fail due to issues with .next folder

Expected behavior

Vitest configuration can help specify folders to include or exclude.

  • adjusting configuration of Vitest to avoid this in the future

Additional context

The error stack:
FAIL .next/standalone/src/app/components/DownloadChecksumsButton.test.ts [ .next/standalone/src/app/components/DownloadChecksumsButton.test.ts ] Error: Cannot find module './cjs/react-jsx-dev-runtime.development.js' Require stack: - /home/kattis/IdeaProjects/sda-download-ui/frontend/.next/standalone/node_modules/react/jsx-dev-runtime.js ❯ Object.<anonymous> .next/standalone/node_modules/react/jsx-dev-runtime.js:6:20

Which was solved by: rm -rf .next and then the tests were working again.

## Describe the bug When running the `test` script a test can fail due to issues with .next folder ## Expected behavior Vitest configuration can help specify folders to [include](https://vitest.dev/config/include.html) or [exclude](https://vitest.dev/config/exclude.html). - [ ] adjusting configuration of Vitest to avoid this in the future ## Additional context The error stack: `FAIL .next/standalone/src/app/components/DownloadChecksumsButton.test.ts [ .next/standalone/src/app/components/DownloadChecksumsButton.test.ts ] Error: Cannot find module './cjs/react-jsx-dev-runtime.development.js' Require stack: - /home/kattis/IdeaProjects/sda-download-ui/frontend/.next/standalone/node_modules/react/jsx-dev-runtime.js ❯ Object.<anonymous> .next/standalone/node_modules/react/jsx-dev-runtime.js:6:20` Which was solved by: `rm -rf .next` and then the tests were working again.
Sign in to join this conversation.
No description provided.