Azure / Azure/static-web-apps

Failed github actions CI/CD deployment to azure

Open
#649 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

It works in local environment.
Error in actions CI/CD deployment

I watch this.
but I couldn't avoid the error.
https://github.com/Azure/static-web-apps/issues/531

```
Detecting platforms...
Detected following platforms:
nodejs: 14.17.6
Version '14.17.6' of platform 'nodejs' is not installed. Generating script to install it...
Error: Could not find either 'build' or 'build:azure' node under 'scripts' in package.json. Could not find value for custom run build command using the environment variable key 'RUN_BUILD_COMMAND'.Could not find tools for building monorepos, no 'lerna.json' or 'lage.config.js' files found.

---End of Oryx build logs---
Oryx could not find a 'build' or 'build:azure' script in the package configuration. Please add one of these commands to your package configuration file (i.e. package.json). Alternatively, you can add the app_build_command to the build/deploy section of your workflow file. For example, app_build_command: 'npm run docs:build'
```

package.json
```
{
"name": "xxxxxxx",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"body-parser": "~1.18.2",
"cookie-parser": "~1.4.3",
"debug": "~2.6.9",
"duplexpair": "^1.0.1",
"ejs": "~2.5.7",
"express": "^4.17.1",
"morgan": "~1.9.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "^3.4.4",
"serve-favicon": "~2.4.5",
"tedious": "14.0.0"
}
}
```

**To Reproduce**
Steps to reproduce the behavior:
1. It works in local environment.
2. push to github
3. auto start actions CI/CD deployment
4. Build and Deploy Job Error

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.