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

Showcase build error with NPM/Windows/Git bash #748

Open
TheRestOfMe opened this issue Jul 11, 2023 · 0 comments
Open

Showcase build error with NPM/Windows/Git bash #748

TheRestOfMe opened this issue Jul 11, 2023 · 0 comments

Comments

@TheRestOfMe
Copy link
Member

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:

> [email protected] postinstall C:\Users\tcook\root\workToolkit\osh-js\showcase
> patch-package
patch-package 6.2.2
Applying patches...
[email protected] ✔
**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! [email protected] postinstall: `patch-package`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
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

1 participant