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

Process Env Error With --ui #785

Closed
6 tasks done
fadi-george opened this issue Feb 18, 2022 · 0 comments · Fixed by #787
Closed
6 tasks done

Process Env Error With --ui #785

fadi-george opened this issue Feb 18, 2022 · 0 comments · Fixed by #787
Assignees

Comments

@fadi-george
Copy link

Describe the bug

Running vitest with --ui leads to

✘ [ERROR] Invalid define value (must be valid JSON syntax or a single identifier): process.env.NODE_ENV

✘ [ERROR] Invalid define value (must be valid JSON syntax or a single identifier): global.process.env.NODE_ENV

✘ [ERROR] Invalid define value (must be valid JSON syntax or a single identifier): globalThis.process.env.NODE_ENV

✘ [ERROR] Invalid define value (must be valid JSON syntax or a single identifier): process.env

Reproduction

Run npm run test:ui to see error
https://stackblitz.com/edit/node-kchysa?file=package.json

Running just test works.

System Info

System:
    OS: macOS 12.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 648.20 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
  Browsers:
    Brave Browser: 98.1.35.103
    Chrome: 98.0.4758.102
    Firefox: 96.0.3
    Safari: 15.2
  npmPackages:
    @vitejs/plugin-react: ^1.2.0 => 1.2.0 
    vite: 2.8.3 => 2.8.3 
    vitest: 0.4.0 => 0.4.0

Used Package Manager

npm

Validations

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

Successfully merging a pull request may close this issue.

2 participants