vite: Vite Installation failing

Describe the bug

I am installing Vite.Js within docker container with linux image.

Packages fail to resolve. Assume the latest version of rollup is impoacting Screenshot 2024-10-27 at 12 55 31 PM

error Couldn’t find package “@rollup/rollup-freebsd-arm64@4.24.1” required by “rollup@^4.2.0” on the “npm” registry.

Reproduction

https://stackblitz.com/edit/vitejs-vite-tfhk5m?file=package.json&terminal=dev

Steps to reproduce

Run npm install vite.js

“dev”: “vite”, “build”: “tsc && vite build”,

System Info

System:
    OS: macOS 13.7
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 42.40 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.15.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.5.0 - /usr/local/bin/npm
    Watchman: 2023.03.06.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 130.0.6723.70
    Safari: 18.0.1

Used Package Manager

yarn

Logs

No response

Validations

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 21
  • Comments: 20 (1 by maintainers)

Most upvoted comments

temp fix: add

"resolutions": {
    "rollup": "4.24.0"
  }

to your package.json

temp fix: add

"resolutions": {
    "rollup": "4.24.0"
  }

to your package.json

This worked

스크린샷 2024-10-27 오후 6 40 27

It’s happening to everyone. Add to package.json temporarily

temp fix: add

"resolutions": {
    "rollup": "4.24.0"
  }

to your package.json

this works …

The issues seems to be resolving with temporary fix in package.json by downgrading rollup to earlier version.

Rollup had a fix for freebsd and seems this is causing the problem for vite when yarn is used.

Switch to temp npm install

“scripts”: { “dev”: “vite”, “build”: “tsc && vite build”, “start”: “vite preview”, “lint”: “eslint ./src”,

  "vite": "5.1.4",

Rollup issues rasied already for the same. : https://github.com/rollup/rollup/issues/5704

Screenshot 2024-10-27 at 3 17 13 PM

“resolutions”: { “rollup”: “4.24.0” }

This works just fine in vite but this issue really needs fixing

Same issue. Fixed with: for yarn

"resolutions": {
    "rollup": "npm:@rollup/wasm-node"
}

for pnpm

"pnpm": {
    "overrides": {
        "rollup": "npm:@rollup/wasm-node"
    }
}

this is also suddenly happened in my GitHub workflow image