node-iohook
node-iohook copied to clipboard
NPM package published with windows line endings
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
Thank you @willemkokke for reporting this issue.
Now it resolved in version 0.0.2 please try it and let me know.
Hi @ayoubserti,
bootstrap.sh is perfect, unfortunately the same needs to be done for Makefile.am and configure.ac before it works.
Hi @willemkokke,
Could you please make a PR, I'm under Windows right now.
Thanks.
You can add these lines into .gitattributes
file:
*.sh -crlf
*.ac -crlf
*.am -crlf
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.
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.
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
Can we have it updated in the NPM repository? Pretty please…