sinedied / backslide

:sweat_drops: CLI tool for making HTML presentations with Remark.js using Markdown
https://sinedied.github.io/backslide
MIT License
764 stars 50 forks source link

New 2.3.6 version could not be loaded (after upgrading yarn to 1.19?) #63

Closed vincent-ferotin closed 5 years ago

vincent-ferotin commented 5 years ago

Using 2.3.4 worked fine for me, but upgrading to 2.3.6 this day lead to an unusable backslide. Running backslide (bs serve, or bs init) now fails with following error: "/usr/bin/env: «node\r»: No such file or directory...".

A way to reproduce the bug is trying to run same commands for both versions, for 2.3.4 first:

$ mkdir project-2.3.4 && cd project2.3.4
project2.3.4$ yarn add backslide@2.3.4
...
project2.3.4$ ./node_modules/backslide/bin/bs init
Presentation initialized successfully

then for 2.3.6:

$ mkdir project-2.3.6 && cd project-2.3.6
project-2.3.6$ yarn add backslide@2.3.6
...
project-2.3.6$ ./node_modules/backslide/bin/bs init
/usr/bin/env: «node\r»: Aucun fichier ou dossier de ce type

It seems to me that the main difference responsible of this behaviour stands in bs file, which at 2.3.4 for its first line ends with a LF, and which at 2.3.6 ends with a CR+LF. Restoring endline with just a LF restores 2.3.4 "saine" and expected behavior (on my Linux though).

I have no idea of why such a change occured, as it seems to not be stored in this git repository (file bin/bs is unchanged since 3 year). Perhaps this is a new behavior introduced by yarn, which lastly bumped its version form 1.17 to 1.19 ?-/

sinedied commented 5 years ago

Whoops, my fault! I pushed latest version from a windows machine, but windows fs does not support proper file permissions :/ it's not visible in the git diff, but I bet that the cause is that the bin file lost the +x permission (had that issue with another project, was a pain to find out). I will push a fixed version from my Mac asap, npm support for windows really sucks :(

sinedied commented 5 years ago

I just republished 2.3.7 from my mac, it should fix the issue. Let me know if you still have troubles!

vincent-ferotin commented 5 years ago

2.3.7 seems to work fine for me (Ubuntu/Linux), like 2.3.4 did. Thanks @sinedied!