Comments (11)
Hi! 👋! Thanks for the report!
There seems to be an issue with the way the patch file was generated on your machine. It is missing the a/
andb/
prefixes for the file paths. i.e. it should look like this:
❯ cat patches/localforage+1.7.1.patch
diff --git a/node_modules/localforage/src/drivers/indexeddb.js b/node_modules/localforage/src/drivers/indexeddb.js
index c77786f..f54a612 100644
--- a/node_modules/localforage/src/drivers/indexeddb.js
+++ b/node_modules/localforage/src/drivers/indexeddb.js
@@ -664,7 +664,12 @@ function setItem(key, value, callback) {
resolve(value);
};
- transaction.onabort = transaction.onerror = function() {
+
+ transaction.onerror = function() {
+ reject(req.error);
+ };
+
+ transaction.onabort = function() {
var err = req.error
? req.error
: req.transaction.error;
I think this is supposed to be part of the git spec: https://git-scm.com/docs/git-diff#_generating_patches_with_p but maybe there are certain environmental factors which could prevent these prefixes from being included. Are you aware of anything?
Otherwise, it would be great to know which OS and git version you're working with. As well as any custom global git configuration you can share.
from patch-package.
Good to know!
- macOS Sierra 10.12.6
- git version 2.14.1
- git config https://github.com/gonzaloserrano/configs/blob/master/gitconfig
from patch-package.
Digged a little and probably is because I'm using custom diff stuff to colorize etc, so maybe adding a flag here
patch-package/src/makePatch.ts
Line 136 in a99c87a
git diff --no-ext-diff
could work (haven't tried).from patch-package.
I think this is the culprit:
I didn't realise this was an option until now :) Out of interest, why do you have that option set?
from patch-package.
Thank you! That must be it.
Probably it was done when I tried this tool https://github.com/so-fancy/diff-so-fancy.
I will get rid of it and try again.
from patch-package.
This is also happening to us.
I tried to use this version in order to fix the "inconsistent white spaces" problem, but run into this one.
It's happening when someone updates/creates a patch on mac and that patch is applied on a windows machine.
This is the log:
2018-07-23T10_17_25_952Z-debug.log
This is the smallest project in which the problem occure. I've included an old patch that was working and the new one, which throws the error above, with my node modules:
https://drive.google.com/open?id=1xnNnOMWR6VJ-x6QC3BbZsS0jT3odgHXN
This is the project without node modules:
patch-test.zip
yarn version:1.7.0
node version: 8.11.3
npm version: 5.1.0
lerna version:2.11.0 (i belive not necessary)
Windows 10 Pro, version 10.0.17134 Build 17134
The patch can by applyed by running "lerna bootstrap" in the main folder, or by runnint "git apply.." in the "first" forder. The result is the same
If you need more details, I m happy to help.
from patch-package.
I tried to bypass this error by reverting the patch to the old one, making the saves myself and running "patch-package".
It applyed it correctly and the app worked. The first time.
Unfortunately, the second time I run yarn, the patch-package failed with the "inconsistent whitespace" problem.
My workaround is to delete the patched node module every time I run yarn.
This is the newly created patch, on the windows machine(I changed it's extension to be able to upload it here):
react-native-charts-wrapper+0.4.3.txt
from patch-package.
Edit:
The workaround did not work. I'm not able to build for a few hours know
from patch-package.
Hi @alexhuiculescu ! 👋 Thanks for the report!
I just got back from a long holiday and have a lot of issues to work through over the next few days. Rest assured this one is a high priority. Thanks for your patience. 🙏
Which cli environment are you using on Windows?
from patch-package.
I'm using VSCode with cmd as default terminal
from patch-package.
Edit: using the built in VSCode command to replace LF with CRLF on the commited files did the trick. I've just made the changes myself while standardizing the end lines with Windows end-line style
from patch-package.
Related Issues (20)
- Improved DX for `patch-package --partial`
- `patch-package` fails to apply changes when switching between branches
- Log the right patchDir when error happens HOT 1
- Support for Bun HOT 5
- Error: There don't appear to be any changes HOT 3
- pnpm patch engines doesn't work HOT 1
- Feature: Consider replacing json-stable-stringify to fulfill compliance for commercial products
- This error occurs when I execute the command HOT 1
- Add support for yarn v2+ HOT 6
- Patching Git modules without version HOT 3
- Warn when patch exists for old version of package HOT 5
- [Proposal] Reduce `patch-package` installation size HOT 2
- [Discussion] Global patches HOT 1
- New patch parse failed
- Add new dependency to a package
- Does patch-package support node12? HOT 1
- Failed to apply patch for package react-native-agora HOT 1
- Is there a way to convert pnpm patches to patch-package patches? Or do they use the same format? HOT 2
- -
- Uniterpretable Error during makePatch HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from patch-package.