Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.1.0] TypeError: allTestFiles.filter is not a function #6516

Closed
6 tasks done
JCQuintas opened this issue Sep 16, 2024 · 1 comment
Closed
6 tasks done

[2.1.0] TypeError: allTestFiles.filter is not a function #6516

JCQuintas opened this issue Sep 16, 2024 · 1 comment

Comments

@JCQuintas
Copy link

JCQuintas commented Sep 16, 2024

Describe the bug

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Startup Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
TypeError: allTestFiles.filter is not a function
    at config (file:///Users/dev/mui/mui-x/node_modules/.pnpm/@vitest+browser@2.0.5_playwright@1.44.1_typescript@5.5.4_vitest@2.1.1/node_modules/@vitest/browser/dist/index.js:2162:47)
    at async runConfigHook (file:///Users/dev/mui/mui-x/node_modules/.pnpm/vite@5.3.4_@types+node@20.16.5_terser@5.27.0/node_modules/vite/dist/node/chunks/dep-D8YhmIY-.js:67015:19)
    at async resolveConfig (file:///Users/dev/mui/mui-x/node_modules/.pnpm/vite@5.3.4_@types+node@20.16.5_terser@5.27.0/node_modules/vite/dist/node/chunks/dep-D8YhmIY-.js:66466:12)
    at async _createServer (file:///Users/dev/mui/mui-x/node_modules/.pnpm/vite@5.3.4_@types+node@20.16.5_terser@5.27.0/node_modules/vite/dist/node/chunks/dep-D8YhmIY-.js:63050:18)
    at async createBrowserServer (file:///Users/dev/mui/mui-x/node_modules/.pnpm/@vitest+browser@2.0.5_playwright@1.44.1_typescript@5.5.4_vitest@2.1.1/node_modules/@vitest/browser/dist/index.js:2501:16)
    at async WorkspaceProject.initBrowserServer (file:///Users/dev/mui/mui-x/node_modules/.pnpm/vitest@2.1.1_@types+node@20.16.5_@vitest+browser@2.0.5_jsdom@24.1.3_msw@2.4.4_typescript@5.5.4__terser@5.27.0/node_modules/vitest/dist/chunks/cli-api.BKkmK21J.js:9483:21)
    at async WorkspaceProject.setServer (file:///Users/dev/mui/mui-x/node_modules/.pnpm/vitest@2.1.1_@types+node@20.16.5_@vitest+browser@2.0.5_jsdom@24.1.3_msw@2.4.4_typescript@5.5.4__terser@5.27.0/node_modules/vitest/dist/chunks/cli-api.BKkmK21J.js:9549:5)
    at async configureServer (file:///Users/dev/mui/mui-x/node_modules/.pnpm/vitest@2.1.1_@types+node@20.16.5_@vitest+browser@2.0.5_jsdom@24.1.3_msw@2.4.4_typescript@5.5.4__terser@5.27.0/node_modules/vitest/dist/chunks/cli-api.BKkmK21J.js:9028:9)
    at async _createServer (file:///Users/dev/mui/mui-x/node_modules/.pnpm/vite@5.3.4_@types+node@20.16.5_terser@5.27.0/node_modules/vite/dist/node/chunks/dep-D8YhmIY-.js:63372:20)
    at async createViteServer (file:///Users/dev/mui/mui-x/node_modules/.pnpm/vitest@2.1.1_@types+node@20.16.5_@vitest+browser@2.0.5_jsdom@24.1.3_msw@2.4.4_typescript@5.5.4__terser@5.27.0/node_modules/vitest/dist/chunks/cli-api.BKkmK21J.js:9050:18)



 ELIFECYCLE  Command failed with exit code 1.

Reproduction

While working on this PR: mui/mui-x#14508

Tests run normally on 2.0.5

Upgrade vitest to 2.1.0, the error will appear.

If you remove the browser section in the config, it works. I don't know exactly what causes it though, as I couldn't reproduce in a smaller repo.

System Info

System:
    OS: macOS 14.6.1
    CPU: (11) arm64 Apple M3 Pro
    Memory: 245.22 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    pnpm: 9.10.0 - ~/.nvm/versions/node/v20.12.2/bin/pnpm
  Browsers:
    Brave Browser: 127.1.68.137
    Chrome: 128.0.6613.138
    Safari: 17.6
  npmPackages:
    @vitejs/plugin-react: ^4.3.1 => 4.3.1 
    @vitest/browser: ^2.0.5 => 2.0.5 
    vitest: 2.1.1 => 2.1.1

Used Package Manager

pnpm

Validations

@JCQuintas
Copy link
Author

nevermind, had to update @vitest/browser 😓

@github-actions github-actions bot locked and limited conversation to collaborators Oct 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant