Code Monkey home page Code Monkey logo

Comments (11)

marvinjaworski avatar marvinjaworski commented on May 29, 2024 5

Same problem here, we are very close to a release with our software and this bug is a big problem for our compliance regulations. It would be important to fix this quickly please 🙏

from react-pdf.

davidovich9 avatar davidovich9 commented on May 29, 2024 2

Temporary fix that worked for me:

  • in package.json:
  "resolutions": {
    "pdfjs-dist": "^4.2.67"
  }

  • in vite.config.ts:
    optimizeDeps: {
        esbuildOptions: {
            target: 'esnext'
        }
    },
    build: {
        target: 'esnext'
    }

from react-pdf.

donovanclarke avatar donovanclarke commented on May 29, 2024 1

@davidovich9 I use react without nextjs and vite. When I set the resolution in the package.json, the message "2 high severity vulnerabilities" persists on npm install.

Are you using yarn, or npm?

yarn you can use resolutions in your package.json file.

And i believe the npm equivalent is overrides.

from react-pdf.

donovanclarke avatar donovanclarke commented on May 29, 2024 1

Using overrides worked for us to remove the warning! What exactly is that doing to fix the issue?

Say you have package A.

And package B, C, D use A as a dependency, but they all use different versions of A.

A resolution or override basically centralizes that version to what you have in your resolution or override.

IMHO, its not a long term solution, but definitely can help out in times like this when we need to quickly get something out.

from react-pdf.

grueneerle avatar grueneerle commented on May 29, 2024 1

The temporary override (pdfjs-dist -> 4.2.67) seems to fix the audit issues but we (@marvinjaworski ) are facing compatibility issues withreact-pdf in version 8.0.2
image
So until we found a solution for this, the override doesn't work in all situations.

from react-pdf.

donovanclarke avatar donovanclarke commented on May 29, 2024

Just another engineer chiming in on this 🙏🏽

Edit:

You could possibly use a resolution as a workaround. I will be testing this shortly.

from react-pdf.

bombillazo avatar bombillazo commented on May 29, 2024

Updated my packages and got this warning as well.

from react-pdf.

marvinjaworski avatar marvinjaworski commented on May 29, 2024

@davidovich9 I use react without nextjs and vite. When I set the resolution in the package.json, the message "2 high severity vulnerabilities" persists on npm install.

from react-pdf.

bombillazo avatar bombillazo commented on May 29, 2024

Using overrides worked for us to remove the warning! What exactly is that doing to fix the issue?

from react-pdf.

donovanclarke avatar donovanclarke commented on May 29, 2024

The temporary override (pdfjs-dist -> 4.2.67) seems to fix the audit issues but we (@marvinjaworski ) are facing compatibility issues withreact-pdf in version 8.0.2 image So until we found a solution for this, the override doesn't work in all situations.

I mean you are bumping a major version of pdfjs. It is more than likely their will be some sort of breaking change.

You could try linting your project to find where the import error is happening and fix it there. You may run into the same issue even with this library updating the dependency.

from react-pdf.

a-str-o avatar a-str-o commented on May 29, 2024

"pdfjs-dist": "3.11.174",
"react-pdf": "^0.0.10", this updated after i do npm i

nextjs app same problem

from react-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.