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

CLI not working #49

Open
rstacruz opened this issue Oct 4, 2015 · 13 comments
Open

CLI not working #49

rstacruz opened this issue Oct 4, 2015 · 13 comments

Comments

@rstacruz
Copy link

rstacruz commented Oct 4, 2015

 →  mdoc
env: node\r: No such file or directory

Using node v4.1.0 in OSX v10.11. Not sure what's causing this.

@eddiemonge
Copy link
Collaborator

Do you have the npm folder in your path?

@rstacruz
Copy link
Author

I installed using -g in this case.

@eddiemonge
Copy link
Collaborator

Ok. Still, do you have the npm folder in your path? Can you run any other globally installed npm binary?

@rstacruz
Copy link
Author

Yep.

@rstacruz
Copy link
Author

i think this is because bin/mdoc has CRLF endings, which don't behave properly on linux and osx.

@eddiemonge
Copy link
Collaborator

It works properly on my OSX so I don't think thats the reason.

@rstacruz
Copy link
Author

Hmm... if you npm install mdoc you'll get CRLF line endings, according to VIM.

@eddiemonge
Copy link
Collaborator

Possibly but that wouldn't prevent it from running. Have you tried removing it and installing it again?

Is the folder returned by: ls -al $(npm -g --get prefix)
in the list thats returned by: echo $PATH
?

Does this return anything: ls -al $(npm -g --get prefix)/bin/mdoc

@millermedeiros
Copy link
Owner

it's definitely the DOS filetype, seen this happen before in other projects.. the #!/usr/bin/env node is not interpreted properly because of the \r (it's considered as part of the executable name)

probably introduced by 40623da

@millermedeiros
Copy link
Owner

ha!, this problem happened before on mdoc as well :P #18

@sandromartis
Copy link

Same here :(

@DanielSundberg
Copy link

I get the same thing here, using Powershell on Windows 8.1. Anyone know a version that is working out-of-the-box? I intend to use this on my build server so poking around in files locally is not an option.

node .\buildDocs.js
C:\Code\Coreweb\CoreInsats\Source\InsatsrapportWeb\Frontend\docs\buildDocs.js:1
(function (exports, require, module, __filename, __dirname) { ??r
^

SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:136:18)
at node.js:963:3

buildDocs.js:

    require('mdoc').run({
        inputDir: '.',
        outputDir: './static/docs'
    });

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

6 participants
@rstacruz @eddiemonge @millermedeiros @DanielSundberg @sandromartis and others