aidenybai / million

Optimize React performance and make your React 70% faster in minutes, not months.
https://million.dev
MIT License
15.87k stars 554 forks source link

Can't install because of cli-high (requires bun) #1042

Open fiws opened 1 month ago

fiws commented 1 month ago

Looks like cli-high is requiring bun. This is on npm 10.8.0. I think it does not happen on some older versions.

❯ npm install @million/lint@latest --save-dev
npm error code 1
npm error path /project/node_modules/cli-high
npm error command failed
npm error command sh -c npx only-allow bun
npm error ╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
npm error ║                                                                                                                              ║
npm error ║   Use "bun install" for installation in this project.                                                                        ║
npm error ║                                                                                                                              ║
npm error ║   If you don't have Bun, go to https://bun.sh/docs/installation and find installation method that suits your environment".   ║
npm error ║                                                                                                                              ║
npm error ╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
github-actions[bot] commented 1 month ago

Thanks for opening this issue! A maintainer will review it soon.

wem1c commented 1 month ago

I'll comment here instead of creating a new issue as I believe they may be related.

I seem to be encountering the same problem, but with the dependency called xycolors:

on  main [!⇡] conor  v22.0.0 ❯ pnpm install @million/lint@latest
 WARN  4 deprecated subdependencies found: glob@7.1.7, glob@7.2.3, inflight@1.0.6, rimraf@3.0.2
Packages: +42
++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 1256, reused 1168, downloaded 0, added 0, done
node_modules/.pnpm/xycolors@0.1.1/node_modules/xycolors: Running preinstall script...
 ELIFECYCLE  Command failed.

on  main [!⇡] conor  v22.0.0 ❯ ❌1     

If we go to the xycolors github repo and check package.json for the preinstall script:

"scripts": {
    ...
    "test": "bun test",
    "preinstall": "npx only-allow bun",
    "up": "taze major -I",
    ...
  },

only-allow is a package that is used to: "Force a specific package manager to be used on a project"