hypercore-protocol / cli

A CLI for peer-to-peer file sharing using the Hypercore Protocol.
MIT License
206 stars 17 forks source link

Error: spawn UNKNOWN #24

Closed jerrygreen closed 3 years ago

jerrygreen commented 3 years ago

I installed hyp and tried to use ls command from the README:

hyp ls hyper://515bbbc1db2139ef27b6c45dfa418c8be6a1dec16823ea7cb9e61af8d060049e/

image

Other commands don't work either:

image

Context

Node version: v14.15.2 Bash version: GNU bash, version 4.4.23(1)-release (x86_64-pc-msys)

andrewosh commented 3 years ago

Thanks for the issue @JerryGreen. Are you on Windows?

jerrygreen commented 3 years ago

@andrewosh yup

andrewosh commented 3 years ago

Gotcha. Windows testing is definitely our weakness :) We'll look into this!

jerrygreen commented 3 years ago

@andrewosh might worth mentioning, that I used the "Git Bash" (NOT cmd.exe), - a windows-version of Bash, which comes together with git scm (which is pretty much the same GNU Bash, except it copies files when using ln commands, instead of creating symlinks, because Windows doesn't support symlinks).

Though I'm not sure if it's a problem with Bash, - also likely the problem with Node. Can't say for sure.

pfrazee commented 3 years ago

Fixed in 1.3.1. We were spawning the daemons by calling the .js files, which depends on the she-bang behavior which ofc windows doesn't support. Fixed by changing the spawn command to node <daemon-script>.

jerrygreen commented 3 years ago

Works like a charm now! Thanks

Though there are still some quirks elsewhere, for example hyp version:

image

Even though it installed 1.3.1:

image

0.0.2 is a version listed in my current folder's package.json, - if I cd into another project, hyp --version shows another version. Not sure if it's related to some Windows stuff, or what is that. Not crucial, so gonna play with this thing anyway :) Thanks again

pfrazee commented 3 years ago

Ahh lovely, thanks. I'll file another issue