dthree / wat

Instant, central, community-built docs
MIT License
495 stars 25 forks source link

Failed to install on Windows #3

Closed Toltar closed 9 years ago

Toltar commented 9 years ago

Hello you have an intresting project that would be awesome for me to contribute. Though I am having trouble installing it or installing it correctly as seen here:

26980 verbose stack Error: ENOENT, open 'C:\Program Files\nodejs\?.cmd'
26980 verbose stack     at Error (native)
26981 verbose cwd C:\WINDOWS\system32
26982 error Windows_NT 6.3.9600
26983 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program           Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "wat"
26984 error node v0.12.7
26985 error npm  v3.2.2
26986 error path C:\Program Files\nodejs\?.cmd
26987 error code ENOENT
26988 error errno -4058
26989 error enoent ENOENT, open 'C:\Program Files\nodejs\?.cmd'
26989 error enoent This is most likely not a problem with npm itself
26989 error enoent and is related to npm not being able to find a file.
26990 verbose exit [ -4058, true ]

Any ideas of why I am receiving these errors? Would it be more appropriate to put this issue on npm?

Qix- commented 9 years ago

This doesn't look like a wat problem. Try re-installing NPM.

dthree commented 9 years ago

Yeah, I'd have to agree with @Qix- haven't seen that before. Let me know if you still have trouble after reinstalling NPM and maybe node.

vweevers commented 9 years ago

No, it's wat. Happens because you cant use a question mark in Windows filenames. So this binary name is the problem:

"bin": {
    "?": "./bin/index.js",
    "wat": "./bin/index.js"
  }
dthree commented 9 years ago

aha! good catch

Toltar commented 9 years ago

Oh ok so basically just that the file name in the binary somehow needs to be fixed.

dthree commented 9 years ago

that's just my package.json I thought i'd be fancy and make '?' a binary command. I felt like I was cheating somehow, and I was right!

vweevers commented 9 years ago

You could instead advise *nix users who want the "?" name to create an alias.

Qix- commented 9 years ago

Aha, yes definitely cheating. That's going to be pretty standard across systems.

Alternatively, suggest making an alias on *nix systems in your .bashrc or .zshrc, etc. in your readme.

alias ?=wut

:kimono: @vweevers beat me to it

dthree commented 9 years ago

Okay this is fixed - Windows build show work now. @Toltar @vweevers if you want to try it out.