Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch a package.json file? #341

Closed
selfagency opened this issue Aug 27, 2021 · 5 comments
Closed

Patch a package.json file? #341

selfagency opened this issue Aug 27, 2021 · 5 comments

Comments

@selfagency
Copy link

I'm trying to fix a broken dependency in a node module within my project by altering the dependency version in the module's package.json but the diff doesn't seem to recognize it. Is there a config flag I need or something?

📂 code/directlink-portal ⋅  feat/AI-218-Page-scaffolding [$✘!+] via 🐳 default ⋅ 📦 v0.1.23 ⋅  v16.7.0 » 1m5s 
15:11:30 ✖1 ➜ micro node_modules/@storybook/vue/package.json

📂 code/directlink-portal ⋅  feat/AI-218-Page-scaffolding [$✘!+] via 🐳 default ⋅ 📦 v0.1.23 ⋅  v16.7.0 » 12s 
15:12:00 ➜ npx patch-package @storybook/vue              
patch-package 6.4.7
• Creating temporary folder
• Installing @storybook/vue@6.3.7 with npm
• Diffing your files with clean files
⁉️  Not creating patch file for package '@storybook/vue'
⁉️  There don't appear to be any changes.
@luisaverza
Copy link

luisaverza commented Aug 30, 2021

I think this issue is duplicated.
Maybe this response could help #49 (comment)

@zoxon
Copy link

zoxon commented Nov 14, 2021

This works for me

npx patch-package some-package --exclude 'nothing'

@mzvast
Copy link

mzvast commented Dec 8, 2021

--exclude 'nothing'

It works like charm! Excellent~

@selfagency
Copy link
Author

Thanks all

@charlesritchea
Copy link

charlesritchea commented Apr 10, 2024

This might technically "work" but if what you're trying to patch is a dependency that should be a devDependency then it won't have any effect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants