vitejs / vite

Next generation frontend tooling. It's fast!
http://vitejs.dev
MIT License
67.49k stars 6.08k forks source link

Uncaught ReferenceError: __DEFINES__ is not defined at env.ts:17:17 #18137

Open anthonybudd opened 1 week ago

anthonybudd commented 1 week ago

Describe the bug

I started work today an I'm getting this error for no aparent reason.

I have rolled back to my changes last night, I have re-cloned and re-installed the deps and I'm still getting this error.

Uncaught ReferenceError: __DEFINES__ is not defined at env.ts:17:17

I have seen someone else has had the same exact issue pop-up out of nowhere and the issue was closed.

  1. https://github.com/vitejs/vite/issues/14314
  2. https://github.com/vitejs/vite/issues/12845

Reproduction

CODEBASE-IS-PRIVATE.com

Steps to reproduce

NO IDEA.

Even when I'm using unmodifed code i still get this issue. The EXACT SAME code is running on the dev server fine right now

System Info

System:
    OS: macOS 12.2.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 513.41 MB / 64.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 18.20.4 - ~/.nvm/versions/node/v18.20.4/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v18.20.4/bin/yarn
    npm: 10.7.0 - ~/.nvm/versions/node/v18.20.4/bin/npm
    pnpm: 9.10.0 - ~/.nvm/versions/node/v18.20.4/bin/pnpm
  Browsers:
    Brave Browser: 128.1.69.162
    Safari: 15.3
  npmPackages:
    @vitejs/plugin-vue: ^4.0.0 => 4.6.2 
    vite: ^4.2.0 => 4.5.5

Used Package Manager

npm

Logs

No response

Validations

sapphi-red commented 1 week ago

Would you try this (https://github.com/vitejs/vite/issues/14314#issuecomment-1709551019)?