/errors/bun/no-version-matching-found-for-specifier
bun install: error: No version matching "99.0.0" found for specifier "is-number" (but package exists)
verified onenvironmentlocal · windows 10.0.26200 arm64 · GNU bash 5.3.15 (Git Bash)updated
- tool
- Bun
- exit code
- 1
- versions
- Bun 1.x
- os
- any
error: No version matching "99.0.0" found for specifier "is-number" (but package exists) means Bun found the package on the registry, but no published version satisfies the version or range in package.json. The suffix (but package exists) tells you the name is right and only the version is wrong. List the real versions with npm view is-number versions and fix the entry, or run bun add is-number@latest.
Reproduce it
cat > package.json <<'EOF2'
{ "name": "app", "version": "1.0.0", "dependencies": { "is-number": "99.0.0" } }
EOF2
npx --yes bun@1 install 2>&1 | grep '^error'
exit "${PIPESTATUS[0]}"Output · exit 1
error: No version matching "99.0.0" found for specifier "is-number" (but package exists) error: is-number@99.0.0 failed to resolve
Bun prints a second line, error: is-number@99.0.0 failed to resolve, naming the dependency that stopped the install.
Fix
cat > package.json <<'EOF2'
{ "name": "app", "version": "1.0.0", "dependencies": { "is-number": "7.0.0" } }
EOF2
npx --yes bun@1 install >/dev/null 2>&1
node -p "require('is-number/package.json').version"Output
7.0.0
When the package name itself does not exist, the message has no (but package exists) suffix and the registry answers 404: check the spelling or the scope.
| Specifier in package.json | Matches |
|---|---|
| 7.0.0 | Exactly 7.0.0 |
| ^7.0.0 | 7.0.0 up to, not including, 8.0.0 |
| ~7.0.0 | 7.0.x |
| latest | Whatever the latest dist-tag points to |
| ^2.0.0-beta.1 | Prereleases of 2.0.0 from beta.1 on, and stable 2.x |
Sources
Related pages
errors · bunbun install: error: lockfile had changes, but lockfile is frozenbun install --frozen-lockfile fails with lockfile had changes, but lockfile is frozen when package.json and bun.lock disagree. Run bun install and commit.commands · npmnpm install a specific version: npm install package@versionInstall an exact version with npm install package@1.2.3, a range with package@^1.2, or a dist-tag with package@next. List published versions with npm view.errors · npmnpm ERR! code ERESOLVE: unable to resolve dependency treenpm fails with ERESOLVE when a package's peer dependency conflicts with the version you install. Read Found and Could not resolve, then align the versions.commands · bunbun add: install a package with Bun (dev, exact, global)bun add pkg installs a package and saves it to package.json and bun.lock. Add -d for devDependencies, --exact to pin, -g for global tools, and trust scripts.