Giter Club home page Giter Club logo

Comments (4)

YuJianrong avatar YuJianrong commented on June 28, 2024

Confirmed on Windows 10, Ubuntu 22.04. Since Node.js v18.1.0 I get the following error.

TypeError: Failed to parse URL from ...node-unrar-js/dist/js/unrar.wasm

@honeo I cannot reproduce in on node v18.3.0, can you create a sample project and shared on github?

from node-unrar.js.

honeo avatar honeo commented on June 28, 2024

I have created a repository to reproduce the problem, please check it.
honeo/example-node-unrar-js

Also, the fact that the unrar.js code is displayed in the console when an error occurs was inconvenient because other logs were flowing during the verification.
Can this feature be made optional?

from node-unrar.js.

YuJianrong avatar YuJianrong commented on June 28, 2024

@honeo I've pushed a new version v2.0.0 to enable the support of node v18, please install the v2.0.0 and try again.
BTW, this code didn't work actually:

for(let {fileHeader, extraction} of files){
	fileHeader.flags.directory ?
		await fsp.mkdir(fileHeader.name):
		await fsp.writeFile(fileHeader.name, extraction);
}

Because in RAR archive, the files are placed at begging and folders are on the end. You may change it to console.log(JSON.stringify(fileHeader), extraction); to see how it works.

from node-unrar.js.

honeo avatar honeo commented on June 28, 2024

Thanks for the fix, now we can update Node.js!
I'm also very happy that the fileHeader now includes the Directory, as it did in ver0, so I don't have to use getFileList in advance.

That code is just a SAMPLE and as I mentioned in the comments, it doesn't work.
Never mind.😉

from node-unrar.js.

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.