hypercore-protocol / cli

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

Error: spawn UNKNOWN #15

Closed fwip closed 3 years ago

fwip commented 3 years ago

When downloading via npm on Windows 10 and Node 14.5.0, I get the error: Error: spawn UNKNOWN for a lot of commands that I try.

> hyp sync hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e22f/
Mirroring daemon started
Error: spawn UNKNOWN

I've attached a minimally-trimmed log of my installation and usage below (click to expand):

``` Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows PS C:\Users\jemma> node Welcome to Node.js v14.5.0. Type ".help" for more information. > PS C:\Users\jemma> npm install -g @hyperspace/cli npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead les\@hyperspace\cli\bin\hyp.js > fd-lock@1.1.1 install C:\Users\jemma\scoop\apps\nvm\current\nodejs\nodejs\node_modules\@hyperspace\cli\node_modules\fd-lock > node-gyp-build > sodium-native@3.2.0 install C:\Users\jemma\scoop\apps\nvm\current\nodejs\nodejs\node_modules\@hyperspace\cli\node_modules\sodium-native > node-gyp-build "node preinstall.js" "node postinstall.js" > utp-native@2.2.2 install C:\Users\jemma\scoop\apps\nvm\current\nodejs\nodejs\node_modules\@hyperspace\cli\node_modules\utp-native > node-gyp-build > leveldown@5.6.0 install C:\Users\jemma\scoop\apps\nvm\current\nodejs\nodejs\node_modules\@hyperspace\cli\node_modules\leveldown > node-gyp-build npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\@hyperspace\cli\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) + @hyperspace/cli@1.0.0 added 278 packages from 185 contributors in 50.725s PS C:\Users\jemma> hyp Usage: hyp [opts...] General Commands: hyp info [urls...] - Show information about one (or more) hypers. hyp seed {urls...} - Download and make hyper data available to the network. hyp unseed {urls...} - Stop making hyper data available to the network. hyp create {drive|bee} - Create a new hyperdrive or hyperbee. Hyperdrive Commands: hyp drive ls {url} - List the entries of the given hyperdrive URL. hyp drive mkdir {url} - Create a new directory at the given hyperdrive URL. hyp drive rmdir {url} - Remove a directory at the given hyperdrive URL. hyp drive cat {url} - Output the content of the given hyperdrive URL. hyp drive put {url} [content] - Write a file at the given hyperdrive URL. hyp drive rm {url} - Remove a file or (if --recursive) a folder at the given hyperdrive URL. ves. Can optionally "commit" the difference. hyp drive sync {source_path_or_url} [target_path_or_url] - Continuously sync changes between two folders in your local filesystem or in hyperdrives. hyp drive http {url} - Host a hyperdrive as using HTTP on the localhost. Hyperbee Commands: hyp bee ls {url} - List the entries of the given hyperbee URL. hyp bee get {url} - Get the value of an entry of the given hyperbee URL. hyp bee put {url} [value] - Set the value of an entry of the given hyperbee URL. hyp bee del {url} - Delete an entry of the given hyperbee URL. Daemon Commands: hyp daemon status - Check the status of the hyperspace daemon. hyp daemon stop - Stop the hyperspace and mirroring daemons if active. Aliases: hyp sync -> hyp drive sync hyp diff -> hyp drive diff hyp ls -> hyp drive ls hyp cat -> hyp drive cat hyp put -> hyp drive put Learn more at https://github.com/hypecore-protocol/cli PS C:\Users\jemma> hyp daemon status Hyperspace v1.13.0 Your address: 24.143.103.2:51735 (Hole-punchable) PS C:\Users\jemma> mkdir ManyDrives Directory: C:\Users\jemma Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 12/11/2020 12:06 PM ManyDrives PS C:\Users\jemma> cd .\ManyDrives\ PS C:\Users\jemma\ManyDrives> hyp Usage: hyp [opts...] General Commands: hyp info [urls...] - Show information about one (or more) hypers. hyp seed {urls...} - Download and make hyper data available to the network. hyp unseed {urls...} - Stop making hyper data available to the network. Hyperdrive Commands: hyp drive ls {url} - List the entries of the given hyperdrive URL. hyp drive mkdir {url} - Create a new directory at the given hyperdrive URL. hyp drive cat {url} - Output the content of the given hyperdrive URL. hyp drive put {url} [content] - Write a file at the given hyperdrive URL. hyp drive rm {url} - Remove a file or (if --recursive) a folder at the given hyperdrive URL. hyp drive diff {source_path_or_url} {target_path_or_url} - Compare two folders in your local filesystem or in hyperdrives. Can optionally "commit" the difference. hyp drive sync {source_path_or_url} [target_path_or_url] - Continuously sync changes between two folders in your local filesystem or in hyperdrives. Hyperbee Commands: hyp bee ls {url} - List the entries of the given hyperbee URL. hyp bee get {url} - Get the value of an entry of the given hyperbee URL. hyp bee put {url} [value] - Set the value of an entry of the given hyperbee URL. Daemon Commands: hyp daemon status - Check the status of the hyperspace daemon. hyp daemon stop - Stop the hyperspace and mirroring daemons if active. hyp sync -> hyp drive sync hyp ls -> hyp drive ls hyp cat -> hyp drive cat hyp put -> hyp drive put Learn more at https://github.com/hypecore-protocol/cli PS C:\Users\jemma\ManyDrives> hyp sync hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e22f/ Mirroring daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> hyp sync hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e22f/ blog Mirroring daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> mkdir blog Directory: C:\Users\jemma\ManyDrives Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 12/11/2020 12:07 PM blog PS C:\Users\jemma\ManyDrives> hyp sync hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e22f/ blog Mirroring daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> hyp sync hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e22f blog Mirroring daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> hyp sync hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e2^W^W^C PS C:\Users\jemma\ManyDrives> hyp drive sync hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e22f blog Mirroring daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> hyp drive sync hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e22f/ blog Mirroring daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> rmdir blog PS C:\Users\jemma\ManyDrives> hyp drive sync hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e22f/ blog Mirroring daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> hyp Usage: hyp [opts...] General Commands: hyp info [urls...] - Show information about one (or more) hypers. hyp seed {urls...} - Download and make hyper data available to the network. hyp unseed {urls...} - Stop making hyper data available to the network. Hyperdrive Commands: hyp drive ls {url} - List the entries of the given hyperdrive URL. hyp drive mkdir {url} - Create a new directory at the given hyperdrive URL. hyp drive cat {url} - Output the content of the given hyperdrive URL. hyp drive put {url} [content] - Write a file at the given hyperdrive URL. the difference. s. Hyperbee Commands: hyp bee ls {url} - List the entries of the given hyperbee URL. hyp bee put {url} [value] - Set the value of an entry of the given hyperbee URL. hyp bee del {url} - Delete an entry of the given hyperbee URL. Daemon Commands: hyp daemon stop - Stop the hyperspace and mirroring daemons if active. hyp diff -> hyp drive diff hyp ls -> hyp drive ls hyp put -> hyp drive put Mirroring daemon started PS C:\Users\jemma\ManyDrives> hyp seed hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e22f/ Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> hyp daemon stop mirroring daemon stopped hyperspace daemon is running. Attempting to stop... hyperspace daemon stopped PS C:\Users\jemma\ManyDrives> hyp daemon Invalid command: daemon PS C:\Users\jemma\ManyDrives> hyp daemon status Daemon not active PS C:\Users\jemma\ManyDrives> hyp seed hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e22f/ Hyperspace daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> hyp info Hyperspace daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> hyp daemon status Daemon not active PS C:\Users\jemma\ManyDrives> hyp sync blog hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e22f/ Hyperspace daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> hyp create drive Hyperspace daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> hyp cat hyper://515bbbc1db2139ef27b6c45dfa418c8be6a1dec16823ea7cb9e61af8d060049e/file.txt Hyperspace daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> node --version v14.5.0 PS C:\Users\jemma\ManyDrives> hyp cat hyper://515bbbc1db2139ef27b6c45dfa418c8be6a1dec16823ea7cb9e61af8d060049e/file.txt Hyperspace daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> hyp sync blog hyper://b282d5efe484143816362d33b3f9b3ea45ecfb8a6ada97e278fdfdc6a725e22f/ Hyperspace daemon started Error: spawn UNKNOWN PS C:\Users\jemma\ManyDrives> hyp daemon status Daemon not active PS C:\Users\jemma\ManyDrives> hyp daemon start Invalid command: daemon PS C:\Users\jemma\ManyDrives> hyp daemon seed Invalid command: daemon PS C:\Users\jemma\ManyDrives> hyp Usage: hyp [opts...] General Commands: hyp info [urls...] - Show information about one (or more) hypers. hyp seed {urls...} - Download and make hyper data available to the network. hyp unseed {urls...} - Stop making hyper data available to the network. hyp create {drive|bee} - Create a new hyperdrive or hyperbee. Hyperdrive Commands: hyp drive ls {url} - List the entries of the given hyperdrive URL. hyp drive mkdir {url} - Create a new directory at the given hyperdrive URL. hyp drive rmdir {url} - Remove a directory at the given hyperdrive URL. hyp drive cat {url} - Output the content of the given hyperdrive URL. hyp drive put {url} [content] - Write a file at the given hyperdrive URL. hyp drive rm {url} - Remove a file or (if --recursive) a folder at the given hyperdrive URL. hyp drive diff {source_path_or_url} {target_path_or_url} - Compare two folders in your local filesystem or in hyperdrives. Can optionally "commit" the difference. hyp drive sync {source_path_or_url} [target_path_or_url] - Continuously sync changes between two folders in your local filesystem or in hyperdrives. hyp drive http {url} - Host a hyperdrive as using HTTP on the localhost. Hyperbee Commands: hyp bee ls {url} - List the entries of the given hyperbee URL. hyp bee get {url} - Get the value of an entry of the given hyperbee URL. hyp bee put {url} [value] - Set the value of an entry of the given hyperbee URL. hyp bee del {url} - Delete an entry of the given hyperbee URL. Daemon Commands: hyp daemon status - Check the status of the hyperspace daemon. hyp daemon stop - Stop the hyperspace and mirroring daemons if active. Aliases: hyp sync -> hyp drive sync hyp diff -> hyp drive diff hyp ls -> hyp drive ls hyp cat -> hyp drive cat hyp put -> hyp drive put Learn more at https://github.com/hypecore-protocol/cli ```
fwip commented 3 years ago

Possibly worth noting - about halfway through, I noticed that I had Beaker open, so I closed Beaker and the daemon (from the system tray), but the issue persisted.

pfrazee commented 3 years ago

Clunk. Thanks for filing, I'll hit this over the weekend.

(Beaker should play along well so no worries there)

pfrazee commented 3 years ago

Fixed in 1.3.1