question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Windows] applying Patch does not work across machines

See original GitHub issue

We are using yarn and somehow, patch-package works only on the machine that created the patch.

Node: 10.13.0 (dev) / 10.15.1 (Teamcity)
Yarn: 1.13.0
patch-package: 6.0.2

Message in console:

patch-package 6.0.2
Applying patches...

**ERROR** Failed to apply patch for package @turf/difference at path

    node_modules\@turf\difference

  This error was caused because patch-package cannot apply the following patch file:

    patches/@turf+difference+6.0.2.patch

  Try removing node_modules and trying again. If that doesn't work, maybe there was
  an accidental change made to the patch file? Try recreating it by manually
  editing the appropriate files and running:

    patch-package @turf/difference

  If that doesn't work, then it's a bug in patch-package, so please submit a bug
  report. Thanks!

    https://github.com/ds300/patch-package/issues

Patch file: @turf+difference+6.0.2.patch

diff --git a/node_modules/@turf/difference/index.js b/node_modules/@turf/difference/index.js
index 89ebe87..a939e3b 100644
--- a/node_modules/@turf/difference/index.js
+++ b/node_modules/@turf/difference/index.js
@@ -80,4 +80,4 @@ function removeEmptyPolygon(geom) {
     }
 }
 
-module.exports = difference;
+export default difference;

We have this problem with every patch does not matter if its turf/difference or an other one.

could this be an white space problem? let me know if you need more information

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
ds300commented, Feb 24, 2019

Thank you so much @edcoreweb for the reproduction ❤️

I was able to fix the issue affecting that project at least. It should be available in 6.0.4 any minute now.

If anyone else is still having problems feel free to open another issue 🙏

2reactions
edcorewebcommented, Feb 20, 2019

On my env works until 6.0.0.14 inclusively. 6.0.0-15 fails

https://github.com/edcoreweb/patch-package-issue

npm i

$ node -v
v8.11.4
$ npm -v
6.8.0
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot problems updating Windows - Microsoft Support
Learn how to troubleshoot problems updating Windows. Find answers to common questions and issues installing Windows updates.
Read more >
What are your options when a patch goes wrong? - N-able
Generally speaking, patches will install fine and without any issues because vendors do a lot of work in the background to ensure their ......
Read more >
Known Issues and Considerations when Using Patch My PC
Patch My PC utilizes the Machine-Wide installer for AnyDesk MSI. The Machine-Wide installer uses the same MSI Product Code for all versions. This...
Read more >
Windows Patch Management Best Practices - GFI
Businesses with only has a handful of Windows servers can use the ... Apply the patch across the entire organization, if no issues...
Read more >
SVN: Problems Applying a Patch Cross-platform
Suppose you have a set of changes on a Windows machine ready for commit. However, before committing, you'd like to check compilation on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found