Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Error: spawn UNKNOWN #253

Closed
XavierGeerinck opened this issue Jun 10, 2017 · 9 comments
Closed

Error: spawn UNKNOWN #253

XavierGeerinck opened this issue Jun 10, 2017 · 9 comments
Labels

Comments

@XavierGeerinck
Copy link

Operating System: Windows 10 (last update)
Node Version: v8.1.0
NPM Version: 5.0.2
Command Run: zenbot trade --paper
Problem: When running the command stated above, I get the error shown below. I went to check into the code and only got that error back from the node process. Is there anyone that had this before? Since a quick search online does not return the solution for me.

Output:

PS E:\Projects\zenbot> zenbot trade --paper
fetching pre-roll data:
internal/child_process.js:317
    throw errnoException(err, 'spawn');
    ^

Error: spawn UNKNOWN
    at exports._errnoException (util.js:1014:11)
    at ChildProcess.spawn (internal/child_process.js:317:11)
    at exports.spawn (child_process.js:471:9)
    at Command.<anonymous> (E:\Projects\zenbot\commands\trade.js:96:26)
    at Command.listener (E:\Projects\zenbot\node_modules\commander\index.js:301:8)
@DeviaVir
Copy link
Owner

Not sure how interested devs are to fix this, since it's on Windows. I dug up the following about a similar problem:
nodejs/node#3116

I would rather advise to use mac or linux.

@XavierGeerinck
Copy link
Author

You are right indeed, I overlooked the fact that it is executing a shell script so that Windows can not interpret it (no idea how I overlooked that). A solution for windows users is to execute node within the "Bash on Windows" subsystem. Maybe we should add this to the docs somewhere?

@DeviaVir
Copy link
Owner

@thebillkidy if you are inclined on figuring this out, you could PR an update to the README.md specific for Windows users, that would be great.

@XavierGeerinck
Copy link
Author

I got it running now, though it is a workaround rather than a solution. Should I PR the workaround somewhere?

@DeviaVir
Copy link
Owner

@thebillkidy I think I have an idea for a place for it.

Could you write in a response here the exact steps a Windows user must take to get this working? I will then put it in the right place for you.

@XavierGeerinck
Copy link
Author

Ok, great! So what I did is the following:

Windows

  1. Install the "Bash on Windows subsystem" (see https://msdn.microsoft.com/en-us/commandline/wsl/about for more information)

Note: This will change soon, seeing that Microsoft decided to have Ubuntu, Fedora and OpenSUSE available. They will also drop the requirement for requiring dev mode enabled on windows soon. Source: https://blogs.msdn.microsoft.com/commandline/2017/05/11/new-distros-coming-to-bashwsl-via-windows-store/ and https://blogs.msdn.microsoft.com/commandline/2017/06/08/developer-mode-no-longer-required-for-windows-subsystem-for-linux/

  1. Open the terminal window, your disks will now be mounted under /mnt/*. So for example navigate to your directory (example: cd /mnt/c/zenbot)
  2. Install node (`curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -; sudo apt-get install nodejs)
  3. Run zenbot as you would otherwise

@DeviaVir Is this enough? :)

@DeviaVir DeviaVir mentioned this issue Jun 10, 2017
@codiwest
Copy link
Contributor

May I quote this answer in the FAQ?

@XavierGeerinck
Copy link
Author

Yep you may

@codiwest
Copy link
Contributor

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants