When building a fresh clone of osh-js using WIndows 10, Git bash shell, and npm 8.1.2, an error occurs (shown below) with the osh-js/showcase/patches files. What works for me is to run dos2unix on all the files the in patches directory, which removes the Carriage-Return and retains Line-Feeds:
cd patches
dos2unix *
cd ..
npm install
Apparently, npm does not like CR+LF line endings
Reference:
ds300/patch-package#191 (comment)
Here is the original error:
> osh-js@1.3.3 postinstall C:\Users\tcook\root\workToolkit\osh-js\showcase
> patch-package
patch-package 6.2.2
Applying patches...
cesium@1.68.0 ✔
**ERROR** Failed to apply patch for package nouislider
This happened because the patch file patches\nouislider+14.4.0.patch could not be parsed.
If you just upgraded patch-package, you can try running:
cd patches\nouislider+14.4.0.patc
patch -p1 -i h
npx patch-package nouislider
cd ../..
Otherwise, try manually creating the patch file again.
If the problem persists, please submit a bug report:
https://github.com/ds300/patch-package/issues/new?title=Patch+file+parse+error&body=%3CPlease+attach+the+patch+file+in+question%3E
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! osh-js@1.3.3 postinstall: `patch-package`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the osh-js@1.3.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
When building a fresh clone of osh-js using WIndows 10, Git bash shell, and npm 8.1.2, an error occurs (shown below) with the osh-js/showcase/patches files. What works for me is to run dos2unix on all the files the in patches directory, which removes the Carriage-Return and retains Line-Feeds:
Apparently, npm does not like CR+LF line endings
Reference:
ds300/patch-package#191 (comment)
Here is the original error: