Questions tagged [patch-package]

Lets app authors instantly make and keep fixes to npm or yarn dependencies.

Module used with both npm and yarn to apply changes to loaded modules, as opposed to having to fork the repository and use the fork.

24 questions
9
votes
5 answers

Patching a NPM package locally with patch-package, not working

I'm working on a vue.js frontend, and I need to patch a package to fit the special needs of the app. The package I'm trying to patch is 'vue-youtube' (not that it really matters). I'm trying to patch it with patch-package…
vicovicovico
  • 358
  • 1
  • 4
  • 16
6
votes
2 answers

React: Patching package.json using patch-package

I am using the patch-package to patch a package.json file of one of my dependencies. I modified the package.json and ran npx patch-package [dependency_name] but it not capturing the changes made to the package.json. However, changes made to other…
kunji mamu
  • 81
  • 1
  • 9
4
votes
2 answers

How to apply all git .patch files from /patches folder - npm

TL,DR; I'm looking for a git command, bash script or npm method (script) to take all .patch files in a folder and run git apply --ignore-whitespace patches/{filename} What I've tried so far: git am --ignore-whitespace patches/*.patch Context…
tao
  • 82,996
  • 16
  • 114
  • 150
3
votes
1 answer

How to use patch-package to patch TSX files

Problem I'm trying to use patch-package to patch a react-native package react-native-tab-view, however when I edit the TSX files included in the node_module for react-native-tab-view and apply my patch, the changes are not reflected in my…
2
votes
0 answers

Failing to run an old repo on localhost

I'm trying to get the repo of a web page running on localhost, to later try to update some of the outdated dependencies. This web page runs on Next JS with Strapi version 3. After Strapi version 4 went live, the team had trouble updating the content…
apfelbaum
  • 21
  • 2
1
vote
1 answer

getUtilityClass is not a function. MaterialUI (MUI) error after just adding webpack server

I got this error after starting up my project: Browser Runtime Error. The only thing I did was to add webpack. This is the config file for webpack reference: const webpack = require('webpack'); const path = require('path'); const HtmlWebpackPlugin =…
1
vote
1 answer

How do I address this webpack 5 issue with polyfills?

If I merely add next js to a boiler-plate Visual-Studio-2022 React JS application I start getting errors. Specifically, after creating the project in the wizard (and verifying it runs), if I then do this in the terminal npm i next And then add the…
Joe
  • 5,394
  • 3
  • 23
  • 54
1
vote
1 answer

Why is my patch not being applied in my docker container?

I'm using patch-package to patch node_modules/oidc-provider/lib/helpers/configuration.js The patch works fine locally. However, try as I might, I can't get Docker to apply the patch when I containerise my software. This is my Dockerfile: FROM…
Bragon
  • 103
  • 8
1
vote
0 answers

How to validate a patch file for patch-package?

I have a made a patch file for patch-package npm module: https://github.com/ds300/patch-package Problem is, when I try to run the patch, it results in this error: ERROR Failed to apply patch for package react-native This happened because the patch…
Ville Miekk-oja
  • 18,749
  • 32
  • 70
  • 106
1
vote
1 answer

Patching React Native with patch-package not working

I'm trying to fix an issue in React Native, I forked the RN repo, added some code to some java files, and run the rn-tester App, my fix was working fine on the rn-tester App, but when adding this fix to a react-native package inside node_modules…
osama mostafa
  • 13
  • 1
  • 6
1
vote
3 answers

Editing npm package locally in Angular 13

I have an Angular app (v13.3.10) and I'm using the ngx-markdown package as a dependency. I'm finding a lot of bugs in this package. To fix this, I'm trying to edit it locally and view changes in-browser when running ng serve. But webpack seems to…
km142646
  • 63
  • 6
1
vote
0 answers

What's the proper way to use patch-package for iOS circleci builds

During a react-native upgrade from version 0.63 to 0.65.2 I ran into an issue where react-native/scripts/find-node.sh was failing on my CircleCI builds. Turns out this is nvm/node related as discussed in the link above. I was able to verify this by…
wheresmyspaceship
  • 870
  • 2
  • 12
  • 19
1
vote
1 answer

Patch Package with Docker

I'm working with a node js backend and I want to deploy the application via docker. I changed two npm packages to get my application working and automatically install these changes with npm patch-package with the help of a post install script in my…
donjus
  • 93
  • 6
0
votes
0 answers

Strapi v4 admin panel customization changes are not getting reflected in build

I am working on strapi v4 and I want to update the homepage and comment everything on admin panel homepage. I tried updating nodemodules/@strapi/admin pages and created a new build but its not reflecting changes. It used to work in v3 like this. I…
Himanshu Chandra
  • 197
  • 4
  • 14
0
votes
1 answer

How to create custom_modules for third-party-packages with modifications?

I have done some changes to the files inside the Pods Folder of Third-party Package and I want to store them with the project but when i run the pod install command, the changes revert backs to original one. Any idea will be appreciated. I have…
Riya N
  • 3
  • 3
1
2