Build on Ubuntu Command OS

Hello, Expo Team.

I build the apk and ios on my windows 10 OS.
It works well.

Then when I build on Ubuntu 16.04 command OS(not UI os), it fails.
Is it possible?
If yes, how to build?

snip_20200323084651

Hi.

I’ve moved your question to the Expo-CLI/Build Service forum, since it’s a question about the Expo CLI (and even better, you’re trying to use the build service!) :slight_smile:

This should work fine on Ubuntu. I have done it many times myself.

I would not do this as root. Rather do it as a normal user.

It seems strange to have your project in /var/www/cms. That looks like it might be a bunch of HTML etc. for a website, rather than an Expo project. Is your Expo project really in /var/www/cms?

There is no “Set” command on Linux. The closest equivalent in bash is export, but the recommended way to enable debugging when running expo commands is like this:

EXPO_DEBUG=true expo build:android

So I suggest you move your project to somewhere that a normal, non-root user can access it and make sure to chown all the files in the project to be owned by that user. e.g.:

sudo chown -R youruser:youruser /path/to/your/project

Then try running expo build:android as that normal user and see what happens.

If you still run into problems, run expo diagnostics from project directory as a normal user and paste the output into a comment here.

1 Like

Hello,
Thanks for your reply

Result expo diagnostics
root@vultr:/var/www/cms# expo diagnostics

Expo CLI 3.15.5 environment info:
System:
OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 10.19.0 - /usr/bin/node
npm: 6.13.4 - /usr/bin/npm
npmPackages:
expo: ~36.0.0 => 36.0.2
react: ~16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4
npmGlobalPackages:
expo-cli: 3.15.5

It works well on my windows 10 system.
Then I upload the project to Ubuntu VPS server and run build the project
It shows issue like image

Also can you tell me minium spec of OS?
Current server has 1GB Ram.

Kind Regards

Hi

I really suggest you do this as a normal user instead of root.

According to the diagnostics you’re on Ubuntu 18.04 which is the latest LTS version. I’ve done this without problems on Ubuntu 14.04.

1 Like

Thanks

When I run the project which has 2GB ram, it works fine.
Then takes much time to build android…

Hello, wodin

I have one question now.
how to set the EXPO_APPLE_PASSOWRD as environment variable on ubuntu.

I run "expo build:ios --apple-id "

Then shows below image
snip_20200324220305

I don’t want to put the password manually

This post was flagged by the community and is temporarily hidden.

Here’s an article that explains environment variables on Ubuntu. See in particular the part about “persistent environment variables”.

https://help.ubuntu.com/community/EnvironmentVariables

Hello, wodin

Thanks for your help!
I have one problem again when build ios
The issue is that my apple id doesn’t exist on database
But I can login on browser

What’s the problem?
Also how can I run build the ios with one command line

Kind Regards

I believe it’s asking for an Expo account. Try running expo login before running expo build:ios.