react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

Install fails: @react-pdf/svg@^1.1.0 404 from npm (Bun / registry)

Open kingRayhan opened this issue 7 months ago • 16 comments

Summary

Installing @react-pdf/renderer fails because the dependency @react-pdf/svg@^1.1.0 cannot be resolved from the public npm registry (HTTP 404).

Environment

  • Package manager: Bun (bun add @react-pdf/renderer / bun i @react-pdf/renderer)
  • Registry: default (https://registry.npmjs.org)

Actual output

error: GET https://registry.npmjs.org/@react-pdf%2fsvg - 404
error: @react-pdf/svg@^1.1.0 failed to resolve

Expected

@react-pdf/renderer and its transitive dependencies resolve and install successfully from npm.

Notes

  • This may affect other package managers if @react-pdf/svg was unpublished, renamed, or never published under that scope/version on npm.
  • Please confirm whether @react-pdf/svg is intended to exist on npm for the version range declared by the current @react-pdf/renderer release, or if the dependency graph / publish pipeline needs updating.

Thank you.

kingRayhan avatar Apr 15 '26 09:04 kingRayhan

Encountered exactly same issue, looks like the @react-pdf/svg is dependency of @react-pdf/image, maybe the package wasn't published properly by pipeline. Pinning the @react-pdf/image version to previous (3.0.4) is a workaround.

Hopefully this will get fixed soon though.

vastamaki avatar Apr 15 '26 10:04 vastamaki

yup facing similar issue but with @react-pdf/renderer

YugmaGandhi avatar Apr 15 '26 10:04 YugmaGandhi

Same

doug-shontz avatar Apr 15 '26 10:04 doug-shontz

same issue using node and npm

1sAndZeros avatar Apr 15 '26 11:04 1sAndZeros

I have with pnpm

 ERR_PNPM_FETCH_404  GET https://registry.npmjs.org/@react-pdf%2Fsvg: Not Found - 404

This error happened while installing the dependencies of @react-pdf/[email protected]
 at @react-pdf/[email protected]
 at @react-pdf/[email protected]

@react-pdf/svg is not in the npm registry, or you have no permission to fetch it.

capaj avatar Apr 15 '26 13:04 capaj

Same issue here @react-pdf/svg is not currently on NPM

jeffgaynor avatar Apr 15 '26 13:04 jeffgaynor

Same here i researched it issue is in this package npm i @react-pdf/image it using @react-pdf/svg but its nowhere to be found

Check on this

https://npmgraph.js.org/?q=%40react-pdf%2Frenderer

Screenshot 2026-04-15 at 6 27 21 PM

Nitin-Campus-ready avatar Apr 15 '26 13:04 Nitin-Campus-ready

"overrides": { "@react-pdf/image": "3.0.4" }

Add this to package json for now

Image

rathoddeepak avatar Apr 15 '26 13:04 rathoddeepak

Same. Downgrad it to 4.2.1

edit: It is not working. So I changed it to 4.3.0

sahilr2050 avatar Apr 15 '26 13:04 sahilr2050

Image

Clap your hands.

jordanolahm avatar Apr 15 '26 13:04 jordanolahm

The latest version of React PDF depends on @react-pdf/svg@^1.1.0, which has been removed from npm. As a result, when npm attempts to fetch this package, it throws a 404 error. The most recent stable version that does not rely on @react-pdf/svg@^1.1.0 is 4.3.0. Therefore, downgrading to version 4.3.0 resolves the issue if you are currently using the latest version or version above 4.3.0.

Rohitdobliyal24 avatar Apr 15 '26 16:04 Rohitdobliyal24

    "name": "@lottus/sdk",
    "version": "1.0.0",
    "exports": {
        "./jobs/*": "./jobs/*",
        "./database": "./database/client.ts",
        "./services/*": "./services/*.ts",
        "./shared/*": "./shared/*.ts",
        "./components/*": "./components/*.tsx"
    },
    "dependencies": {
        "@aws-sdk/client-s3": "^3.1019.0",
        "@better-auth/expo": "^1.5.6",
        "@react-pdf/renderer": "4.2.1",
        "axios": "^1.13.6",
        "better-auth": "^1.5.6",
        "bullmq": "^5.46.1",
        "date-fns": "^4.1.0",
        "mercadopago": "^2.4.0",
        "next-auth": "5.0.0-beta.25",
        "openai": "^4.91.1",
        "pdf-lib": "^1.17.1",
        "redis": "^4.7.0",
        "resend": "^4.0.0",
        "xlsx": "^0.18.5",
        "zod": "^3.24.2"
    },
    "devDependencies": {
        "@types/bun": "^1.2.8",
        "prisma": "^6.5.0",
        "@prisma/client": "^6.5.0"
    },
    "overrides": { "@react-pdf/image": "3.0.4" },
    "scripts": {} 
}

<img width="513" height="161" alt="Image" src="https://github.com/user-attachments/assets/7b3d2cf9-a8b7-4f56-b8f6-1b61792b4bbf" />

The problem persists even after adding overrides, downgrading the package version, clearing caches, etc...

Enviroment:
Monorepo with Bun

ismael-rodrigo avatar Apr 15 '26 16:04 ismael-rodrigo

facing exactly same issue and the problem still persists even afer downgrading to package version 4.3.0 or 4.2.4

supriya-eggoz avatar Apr 15 '26 20:04 supriya-eggoz

CI did not publish this package. Just did manually.

Also, please check existing issues when posting. It's not that time consuming

diegomura avatar Apr 15 '26 20:04 diegomura

Encountered exactly same issue, looks like the @react-pdf/svg is dependency of @react-pdf/image, maybe the package wasn't published properly by pipeline. Pinning the @react-pdf/image version to previous (3.0.4) is a workaround.

Hopefully this will get fixed soon though.

This works

JoniJuntto avatar Apr 16 '26 07:04 JoniJuntto

"@react-pdf/renderer": "^4.3.0", This is working fine now. No issue faced for the dependency @react-pdf/svg@^1.1.0

supriya-eggoz avatar Apr 16 '26 07:04 supriya-eggoz