How I fix a node_module dependency by myself and you can do it too
Last active
February 10, 2025 02:29
-
-
Save bunsyy/733af02a7c59625811c2f6ea0392acff to your computer and use it in GitHub Desktop.
How I fix a node_module dependency by myself
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install -D patch-package | |
# yarn add -D patch-package |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"scripts": { | |
... | |
"postinstall": "patch-package" | |
}, | |
... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// inside index.ts file of the cz-emoji package | |
... | |
// old | |
const type = config.types.find(type => type.code === emoji.emoji).name | |
^ ^ | |
// new | |
const type = config.types.find(type => type.name === emoji.name).name | |
^ ^ | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npx patch-package cz-emoji | |
# yarn patch-package cz-emoji |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install | |
# yarn install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment