WSL not found, but Ubuntu is installed and running

#1

I am using a machine that we have successfully built with before but it has been a while. So I have updated expo-cli and tested the project. It works with Expo on my iPad and the published version works as well. Now I am trying expo build:ios and I get the following:

>expo build:ios
There is a new version of expo-cli available (2.6.10).
You are currently using expo-cli 2.6.5
Run `npm install -g expo-cli` to get the latest version
[20:38:17] Making sure project is set up correctly...
[20:38:19] Your project looks good!
[20:38:19] Checking if current build exists...

[20:38:19] No currently active or previous builds for this project.
[20:38:19]
Does not seem like WSL enabled on this machine. Download from the Windows app
store a distribution of Linux, then in an admin powershell, please run:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

and run the new Linux installation at least once

? How would you like to upload your credentials?
 I will provide all the credentials and files needed, Expo does limited validation

We need your Apple ID/password to ensure the correct teamID and appID

Note: Expo does not keep your Apple ID or your Apple password.

? What's your Apple ID? <appleID>
? Password? [hidden]
[20:38:41] Validating Credentials...
Error: spawn C:\Windows\system32\bash.exe ENOENT
    at _errnoException (util.js:992:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

This happens with expo-cli versions 2.6.10, 2.6.11, and now 2.6.5 after seeing some people having success after rolling back. Should I rollback further?

I have WSL enabled and Ubuntu installed. I have run Ubuntu and it works. I have uninstalled and reinstalled Ubuntu, and then created a user again. I have run Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux and I get the following. It is already enabled as far as I can tell.

Path          :
Online        : True
RestartNeeded : False

Why is it not able to find my WSL? gcm bash.exe returns the correct path and bash.exe -c ‘uname’ gives me Linux. I believe everything is normal here.

#2

Hey @mc10,

Sorry you are experiencing this issues. I just brought this up internally. I’ll circle back when I have more information on what could be causing this.

Cheers,

Adam

#3

Hello @mc10,
could you please send the output of gcm bash.exe? Is the bash.exe on the disk C:\?

I tried to reproduce this issue:

  • I got almost fresh Windows
  • I installed Ubuntu
  • I ran Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • I ran Ubuntu once
  • I created a new expo project (expo-cli@2.6.11) - expo init windows-test
  • I ran expo build:ios
  • The command succeeded to generate new credentials (and to schedule app build).
#4

Hi all, thanks for all the help.

The output is below. It is on the C: drive.

PS C:\Windows\system32> gcm bash.exe

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     bash.exe                                           10.0.17... C:\Windows\system32\bash.exe

My Expo project is on a different drive F:. I’m not sure if this is causing the issue. I believe this was our setup previously and it would build fine. I copied it to the C: drive and tried again, still gives me the WSL warning.

Does not seem like WSL enabled on this machine. Download from the Windows app
store a distribution of Linux, then in an admin powershell, please run:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

and run the new Linux installation at least once

Here is what is currently open and running:

closed #5

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.