JohnByrneRepo / mddir

Mddir generates a markdown file/folder structure for readme files
Other
215 stars 46 forks source link

Unable to use #7

Closed RichardLitt closed 5 years ago

RichardLitt commented 7 years ago

Hey! Thanks for this module. I tried to use it today, and found this error:

$ mddir
env: node\r: No such file or directory

Not sure what is up, here.

marcobarbosa commented 7 years ago

Same issue here. I believe this for Mac users? Seems like it has to do with line endings.

EDIT: This comment has a good fix suggestion. Worked for me.

RichardLitt commented 7 years ago

I was unable to find any \r chars using a regex in my cloned copy. :/

JohnByrneRepo commented 7 years ago

Hi, thanks for trying out my library. Apologies for the delay. I've found a fix for this, and updated the readme. It's possible I merged a pr on a Windows system and I am looking into a longer term solution. For now though:

Line endings fix

Get npm bin folder path with:

npm config get prefix

Cd into that folder

brew install dos2unix

dos2unix lib/node_modules/mddir/src/mddir.js

This converts line endings to Unix instead of Dos

Then run as normal with: node mddir "../relative/path/"

ispyhumanfly commented 5 years ago

I have resolved this in my latest pull request by making another mddir command called mddir-nix which works on all Unix flavors. See some of the updates I made here #10 . You can also view my version at http://github.com/flypapertech/mddir

RichardLitt commented 5 years ago

I can no longer replicate. As I opened this, I'm going to close it. Thank you, @JohnByrneRepo.