W
W
WebDev2019-07-10 20:12:55
JavaScript
WebDev, 2019-07-10 20:12:55

How to correct errors in npm packages?

Found a bug in npm package. In addition to npm, this package is on github, wrote to the developer there and created a pull request.
While I wait for the developer to accept the request, I need everything to work for me, so I got into node_modules and manually made changes to the file.
Everything works, but now I have to keep it in my head, not update packages and check when the developer accepts my edits.
How to make changes in such cases?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
OnYourLips, 2019-07-10
@kirill-93

Fork until they fix it.

S
Serezha, 2019-07-10
Ahen @Ahen

I'm not sure, but look at https://www.npmjs.com/package/patch-package
Allows you to patch packages, allows you to apply a patch during npm install, you won't need to keep in mind, because the patches will be stored in a separate folder.

No more waiting around for pull requests to be merged and published. No more forking repos just to fix that one tiny thing preventing your app from working.

A
Andrey Suha, 2019-07-10
@andreysuha

Well, exactly as you did. The only thing you can do is not to wait and try to find an alternative package

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question