vitejs / vite

Next generation frontend tooling. It's fast!
http://vite.dev
MIT License
68.52k stars 6.19k forks source link

Can not start project #18604

Open kba-tmn3 opened 5 days ago

kba-tmn3 commented 5 days ago

Describe the bug

I install dependencies with vite ^5.3.1 (latest minor updates available) and fail with error

$ vite
file:///home/project/node_modules/vite/dist/node/chunks/dep-BWSbWtLw.js:61873
            url = injectQuery(url, "direct");
                                            ^

SyntaxError: Unexpected token ';'
    at compileSourceTextModule (node:internal/modules/esm/utils:340:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
    at #translate (node:internal/modules/esm/loader:433:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:480:27)

Node.js v22.11.0
error: script "dev" exited with code 1

Reproduction

https://google.com

Steps to reproduce

bun i and bun dev equal results with rm -R node_modules and npm i and npm run dev

System Info

System:
    OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (12) x64 AMD Ryzen 5 5600G with Radeon Graphics
    Memory: 12.82 GB / 27.29 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 22.11.0 - /usr/local/bin/node
    npm: 10.9.0 - /usr/local/bin/npm
    bun: 1.1.34 - ~/.bun/bin/bun
  npmPackages:
    @vitejs/plugin-react: ^4.3.1 => 4.3.3 
    vite: ~5.3.1 => 5.3.6

Used Package Manager

bun

Logs

debug

file:///home/project/node_modules/vite/dist/node/chunks/dep-BWSbWtLw.js:61873
            url = injectQuery(url, "direct");
                                            ^

SyntaxError: Unexpected token ';'
    at compileSourceTextModule (node:internal/modules/esm/utils:340:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
    at #translate (node:internal/modules/esm/loader:433:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:480:27)

Node.js v22.11.0

Validations

bluwy commented 4 days ago

Perhaps you can try node 20? The error doesn't make sense to me.