oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.57k stars 2.72k forks source link

bun install error: No version matching "^3.4.1" found for specifier "tailwindcss" (but package exists) #13371

Open shu-vro opened 1 month ago

shu-vro commented 1 month ago

What version of Bun is running?

1.1.24+85a329911

What platform is your computer?

Linux 6.10.3-200.fc40.x86_64 x86_64 unknown

What steps can reproduce the bug?

bun create next-app .

or

bun install # inside the directory

What is the expected behavior?

no error, clean install of all dependencies

What do you see instead?

✔ Would you like to use TypeScript? … No / Yes ✔ Would you like to use ESLint? … No / Yes ✔ Would you like to use Tailwind CSS? … No / Yes ✔ Would you like to use src/ directory? … No / Yes ✔ Would you like to use App Router? (recommended) … No / Yes ✔ Would you like to customize the default import alias (@/)? … No / Yes ✔ What import alias would you like configured? … @/ Creating a new Next.js app in /home/shirshen/Documents/js/edusolve.

Using bun.

Initializing project with template: app-tw

Installing dependencies:

Installing devDependencies:

bun install v1.1.24 (85a32991) error: No version matching "^3.4.1" found for specifier "tailwindcss" (but package exists) error: tailwindcss@^3.4.1 failed to resolve

Aborting installation. bun install has failed.

Additional information

dylan-conway commented 1 month ago

If you still have it on disk, could you share the file 54a3ef056cc9f84a.npm from the bun install cache? You can get the path with bun pm cache. The file contains package manifest information for tailwindcss and is likely causing this bug, it would be useful to inspect

shu-vro commented 1 month ago

I'm sorry but uploading .npm formats on github is not supported. I can provide you The screenshot of that file I opened using vscode hex editor. image

Also, I can give you the file changing its format to txt. 54a3ef056cc9f84a.txt

Ask me if you need anything else.

shu-vro commented 1 month ago

Oh, I fixed it. I cleaned the cache using bun pm cache rm and after running bun install, it installed all dependencies, no error.

dylan-conway commented 1 month ago

Reopening because the bug is caused by outdated or invalid cache. Deleting cache will fix, but the issue could happen again. Will be investigating this today

emilienbidet commented 1 month ago
bun install v1.1.24
error: No version matching "^18.3.1" found for specifier "react" (but package exists)
error: No version matching "^0.23.2" found for specifier "scheduler" (but package exists)
error: No version matching "*" found for specifier "@types/node" (but package exists)
error: No version matching "^4.11.5" found for specifier "astro" (but package exists)
error: No version matching "4.1.8" found for specifier "vscode-json-languageservice" (but package exists)
error: No version matching "*" found for specifier "@types/node" (but package exists)
error: @types/node@* failed to resolve
error: @types/node@* failed to resolve
error: astro@^4.11.5 failed to resolve
error: react@^18.3.1 failed to resolve
error: scheduler@^0.23.2 failed to resolve
error: vscode-json-languageservice@4.1.8 failed to resolve

Same error here, this just appear when I created a new package and tried to run bun install in my workspace.

EDIT: Solved by running bun pm cache rm and then bun install

TheLazySquid commented 1 month ago

I'm having the same problem with @sveltejs/vite-plugin-svelte@next, but even after running bun pm cache rm it still refuses to install with the error No version matching "^3.0.0-next.0||^3.0.0" found for specifier "@sveltejs/vite-plugin-svelte-inspector" (but package exists). Npm installs it without issue.

isaacfink commented 6 days ago

@TheLazySquid Did you find a solution? I am running into the same issue now

TheLazySquid commented 5 days ago

Unfortunately not, I ended up switching back to npm.