Skip to content

Command not found: patch-package #14

@juncoding

Description

@juncoding

Hello,

run patch-package to create a .patch file

patch-package some-package

After "npm install patch-package",
I run the command "patch-package" on terminal but got "zsh: command not found: patch-package".

I'm using macOS Sierra.

Please advise.
Thanks.

Activity

changed the title [-]command not found: patch-package[/-] [+]Command not found: patch-package[/+] on Sep 6, 2017
ds300

ds300 commented on Sep 6, 2017

@ds300
Owner

either:

  • if you're using yarn you can run yarn patch-package <args>
  • otherwise ./node_modules/.bin/patch-package <args>
  • or add ./node_modules/.bin to your $PATH environment variable (I prefer doing this)

It didn't occur to me that lots of people have not done that last option, so the instructions in the README won't work for them. I'll improve the README later, thanks.

juncoding

juncoding commented on Sep 6, 2017

@juncoding
Author

It works. thank you.

ds300

ds300 commented on Sep 11, 2017

@ds300
Owner

I decided not to modify the README because I can't figure out how to do so without sacrificing clarity. I hope that anyone who has the same issue you had will end up here via google or github search.

pradeepdev001

pradeepdev001 commented on Oct 10, 2022

@pradeepdev001

if you're using yarn--

Step 1: yarn add patch-package
Step 2: yarn patch-package <your patches || leave blank to run all at once>
OR ./node_modules/.bin/patch-package <your patches || leave blank to run all at once>

if you're using npm--

Step 1: npm install patch-package
Step 2: patch-package <your patches || leave blank to run all at once>
OR ./node_modules/.bin/patch-package <your patches || leave blank to run all at once>

added a commit that references this issue on Oct 13, 2022
im-vignesh

im-vignesh commented on Apr 7, 2023

@im-vignesh

run "npx patch-package". It'll work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ds300@juncoding@im-vignesh@pradeepdev001

        Issue actions

          Command not found: patch-package · Issue #14 · ds300/patch-package