Azure / Azure/static-web-apps

Unable to deploy static web app

Open
#1,224 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Description**

I get the following error when trying to deploy a React app to an Azure static web app:

```
npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR! https://www.npmjs.com/forgot
npm ERR!
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR! npm login

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-07-12T10_22_15_527Z-debug-0.log

---End of Oryx build logs---
Oryx has failed to build the solution.

For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/
Exiting
##[error]Error: The process '/usr/bin/bash' failed with exit code 1
Finishing: AzureStaticWebApp
```

**Steps to reproduce the behavior**
1. Create a static web app in the Azure portal.
2. During configuration of the static web app, connect the web app to an Azure DevOps repo branch containing a CRA React app.
3. Make a commit to the connected branch to trigger the Azure Pipelines .yml file created by the Azure static web app.
4. Observe as the build fails with the error message provided above.

**Expected behavior**
For the React app to be successfully deployed to the Azure static web app.

**Screenshots**
![image](https://github.com/Azure/static-web-apps/assets/139343901/75a0df0c-f852-4318-849d-f0d984e954b0)

**Attachments**
[staticwebapp.config.zip](https://github.com/Azure/static-web-apps/files/12026918/staticwebapp.config.zip)
[azure-static-web-apps.zip](https://github.com/Azure/static-web-apps/files/12026923/azure-static-web-apps.zip)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.