2

When I deploy the application in Azure with Visual Studio Code, I get the following error stack:

2020-10-28T20:34:32.249Z INFO - Initiating warmup request to container appdemo_xxxxxx for site appdemo_xxxxxx 2020-10-28T20:34:37.841Z ERROR - Container appdemo_xxxxxx for site appdemo_xxxxxx has exited, failing site start 2020-10-28T20:34:37.844Z ERROR - Container appdemo_xxxxxx didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging. 2020-10-28T20:34:37.874Z INFO - Stopping site appdemo_xxxxxx because it failed during startup.

The Plan de App Service is a SO Linux.

If I change start in package.json to "node index.js" work fine, but if I use this, not work:

 "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "test": "jest --watchAll"
  },

I have created the variables in Configuration -> App Settings PORT = 8080 and WEBSITES_PORT = 80

What am I doing wrong?

3 Answers 3

1

I found the solution for this error:

  1. Export the project from the VS terminal: expo build:web --no-pwa
  2. Transfer it using FTP to Azure
  3. Ready!
Sign up to request clarification or add additional context in comments.

Comments

0

Remove the PORT setting and change your WEBSITES_PORT to 8080. The start command should be picked up from your "start" script in your package.json. If that isn't working, you can try setting npm expo start as a start-up command under Application Settings blade in the portal or use Azure CLI command az webapp config set --resource-group <resource-group-name> --name <app-name> --startup-file "npm expo start". Also make sure your expo dependencies are being installed correctly. You should be able to verify in your deployment logs. If not, you can customize a pre-startup batch command to run your necessary npm install command.

Comments

0

In my case I had to run: expo export --platform web

Then you can see the files inside a directory called dist

Upload these files on a file server.

Official Documentation: how to publish websites on Netlify, Firebase, Github Pages, etc

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.