node-iohook icon indicating copy to clipboard operation
node-iohook copied to clipboard

NPM package published with windows line endings

Open willemkokke opened this issue 7 years ago • 8 comments

Hi,

When I add node-iohook as a dependency to my projects, it fails to install on mac (and I assume linux as well)

I've tracked it down to the libuiohook/bootstrap.sh containing windows line endings (CRLF) which prevent /bin/sh from executing it.

If I check the project using git, it installs fine

willemkokke avatar Aug 05 '17 10:08 willemkokke

Thank you @willemkokke for reporting this issue.

Now it resolved in version 0.0.2 please try it and let me know.

ayoubserti avatar Aug 07 '17 15:08 ayoubserti

Hi @ayoubserti,

bootstrap.sh is perfect, unfortunately the same needs to be done for Makefile.am and configure.ac before it works.

willemkokke avatar Aug 09 '17 14:08 willemkokke

Hi @willemkokke,

Could you please make a PR, I'm under Windows right now.

Thanks.

ayoubserti avatar Aug 27 '17 15:08 ayoubserti

You can add these lines into .gitattributes file:

*.sh     -crlf
*.ac     -crlf
*.am     -crlf

sobolevn avatar Sep 06 '17 17:09 sobolevn

The problem is that they need to be unix line endings at publishing time. And I can't publish a new version of your package, only you can.

If I understand @sobolevn right, adding those line to your .gitattributes files, means that those files will be checked out with unix line endings, even on windows.

If so, that would an excellent solution.

willemkokke avatar Sep 06 '17 17:09 willemkokke

Hi

@willemkokke , @sobolevn I am trying to installing this package and getting the same error you mentioned it above and as per your solution I am creating .gitattributes file and adding those line but still can't get install the package and getting the following error.

error: AC_CONFIG_MACRO_DIRS([m4]) conflicts with ACLOCAL_AMFLAGS=.I m4

any help would be appreciated.

rajjagani021 avatar Sep 12 '17 10:09 rajjagani021

Hi @rajjagani.

Unfortunately, if this is a solution (it was @sobolevn's idea, it sounds good to me, but I haven't tried) it will only work if @ayoubserti implements it and publishes a new version that doesn't have Windows line endings in the configure scripts

willemkokke avatar Sep 12 '17 10:09 willemkokke

Can we have it updated in the NPM repository? Pretty please…

Plaque-fcc avatar Jan 16 '19 16:01 Plaque-fcc