Code Monkey home page Code Monkey logo

Comments (3)

sindresorhus avatar sindresorhus commented on July 21, 2024

What Node.js version? Try with the latest one. It should not crash like that no matter what. You should report this to the Node.js project if it's still an issue in the latest version.

You probably want to limit the concurrency as Node.js doesn't seem to be able to handle it. You can use https://github.com/sindresorhus/p-all or https://github.com/sindresorhus/p-map

Closing as this is not an issue with this package.

from hasha.

Daniele122898 avatar Daniele122898 commented on July 21, 2024

Even when using your queue plugin with concurrency 1 it still crashes like this. I updated my electron version and am now using node 12.18.3 and it's still happening so i think its an issue with this package.

  const queue = new PQueue({concurrency: 1});
  const results = await queue.addAll<string>(data.paths.map(f => () => hasha.fromFile(f, {algorithm: 'md5'})));

Also bear in mind these files are rather big video files maybe that breaks smth in the package?
@sindresorhus tagging since i dont know if a closed issue will notify you...

Edit: All good i removed hasha and switched to md5File which works with Promise.all

from hasha.

sindresorhus avatar sindresorhus commented on July 21, 2024

I updated my electron version and am now using node 12.18.3 and it's still happening so i think its an issue with this package.

No, it's not. The error is a native V8 error, which JS code should not be able to trigger at all. So even if hasha did something wrong (which it does not), it should not have been able to crash Node.js like this.

This is definitely a problem with Electron.

from hasha.

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.