The solution was as simple as adding the following to package.json:
{
"engines" : {
"node" : "10.x"
}
}
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to deploy an static app but when running the github action workflow I get an error. My hypothesis is that the node version used by github is incompatible with other dependencies so I would like to downgrade it from 14.x to 10.x
How do I do that?
Based on some docs (https://github.com/actions/setup-node) I managed to modify the workflow file (without success, still using node 14.x) like this:
name: Azure Static Web Apps CI/CD
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- master
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup node 10
uses: actions/setup-node@v1
with:
node-version: 10.13.0
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v0.0.1-preview
with:
azure_static_web_apps_api_token: ${<!-- -->{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_THANKFUL_FOREST_089032F10 }}
repo_token: ${<!-- -->{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
api_location: "api" # Api source code path - optional
output_location: "www" # Built app content directory - optional
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v0.0.1-preview
with:
azure_static_web_apps_api_token: ${<!-- -->{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_THANKFUL_FOREST_089032F10 }}
action: "close"
Help would be much appreciated
The solution was as simple as adding the following to package.json:
{
"engines" : {
"node" : "10.x"
}
}
Is there any way to specify the node version to be used in the static app build?