Skip to content

"vitest" command getting `TypeError: Cannot use 'in' operator to search for 'NO_COLOR' in undefined at chunk-colors #3550

@aysegulkavakli

Description

@aysegulkavakli

Describe the bug

When I run the command vitest, I get the error;

TypeError: Cannot use 'in' operator to search for 'NO_COLOR' in undefined
❯ createColors node_modules/@vitest/utils/dist/chunk-colors.js:47:66
❯ setupGlobalEnv node_modules/vitest/dist/entry.js:53:15
❯ run node_modules/vitest/dist/entry.js:242:3
❯ run node_modules/vitest/dist/worker.js:60:5
❯ async file:/Users/aysegulkavakli/WebstormProjects/metamax-console/node_modules/tinypool/dist/esm/worker.js:109:20

and no test files found. Including vitest version 0.28.5 and before is working fine.

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-mafqkz?file=package.json,vite.config.ts&initialPath=__vitest__/

System Info

System:
    OS: macOS Big Sur 11.5.2
  Binaries:
    Node: 16.14.0 - /usr/local/opt/node@16/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
  Browsers:
    Chrome: 113.0.5672.126
  yarnPackages:
    testing-library/react: 14.0.0,
    vitejs/plugin-react: 4.0.0,

Used Package Manager

yarn

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions