Giter Site home page Giter Site logo

Comments (4)

Cajuteq avatar Cajuteq commented on June 2, 2024

Hi, I had the same problem and used browser compatible deps as placeholders for the fs, path, and crypto packages. Hopes this can help you.

  "dependencies": {
    ...  
    "crypto": "npm:crypto-browserify",
    "crypto-browserify": "^3.12.0",
    "fs": "npm:fs-browsers",
    "fs-browsers": "^1.1.6",
    "path": "npm:path-browserify",
    "path-browserify": "^1.0.1",
    ...
  }

from argon2-browser.

dangtony98 avatar dangtony98 commented on June 2, 2024

Wonder if there's a better way around this ... I'd prefer to stay away from introducing new dependencies to solve this issue.

@antelle would you have any solutions for this? - I'm running a Next.js application and need to use argon2-browser.

Edit:

The example provided in this repo worked perfectly for nextjs

from argon2-browser.

glihm avatar glihm commented on June 2, 2024

Did you try to disable those in the package.json file?

"browser": {
    "fs": false
},

@dangtony98 the example you linked is doing exactly this in the configuration file next.config.js:

if (!isServer) {
  config.resolve.fallback.fs = false;
}

from argon2-browser.

valerius21 avatar valerius21 commented on June 2, 2024

Could not find any of the solutions above to get them to work on NextJS 14. I'm using it with skiff-crypto

from argon2-browser.

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.