Unable to deploy Keystone JS app to Azure app service
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- azure, github-actions, nodejs, typescript
Research direction
Review the inline GitHub Actions workflow and Azure App Service logs first, focusing on the deployed package and the /home/site/wwwroot/node_modules/.bin/keystone failure. Done means the Keystone Admin UI is accessible after deployment and startup no longer reports MODULE_NOT_FOUND for ../scripts.
Written by the indexing model from the issue text.
Description
I created a simple Keystone JS app which runs fine locally. I tried deploying it to Azure App Service using GIthub actions. My workflow file:
`
name: Build and deploy Node.js app to Azure Web App - keystonetestagain
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js version
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
# npm run test --if-present
- name: Zip artifact for deployment
run: zip release.zip ./* -r
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: node-app
path: release.zip
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write #This is required for requesting the JWT
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: node-app
- name: Unzip artifact for deployment
run: unzip release.zip
- name: Login to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_C400F12F0E8B4117A7411E9521FE76FF }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_8FB1CA952DDC44BC9E1FF235ECB9641A }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_6E81A4870FF14BEF9340A1D315A06B25 }}
- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'keystonetestagain'
slot-name: 'Production'
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: .
`
Though the deployment ran successfully Keystone Admin UI is not accessible. When I check the Application logs I am seeing the following errors:
2024-03-27T11:08:41.519337232Z npm start
2024-03-27T11:08:54.435141246Z npm info using [email protected]
2024-03-27T11:08:54.436281663Z npm info using [email protected]
2024-03-27T11:08:54.797558523Z
2024-03-27T11:08:54.797591023Z > [email protected] start
2024-03-27T11:08:54.797597024Z > keystone start
2024-03-27T11:08:54.797600424Z
2024-03-27T11:08:58.679823860Z npm http fetch GET 200 https://registry.npmjs.org/npm 3975ms (cache updated)
2024-03-27T11:08:59.084723958Z npm http fetch GET 200 https://registry.npmjs.org/npm 4365ms (cache updated)
2024-03-27T11:09:00.654423991Z node:internal/modules/cjs/loader:1147
2024-03-27T11:09:00.654461192Z throw err;
2024-03-27T11:09:00.654466692Z ^
2024-03-27T11:09:00.654470192Z
2024-03-27T11:09:00.654473292Z Error: Cannot find module '../scripts'
2024-03-27T11:09:00.654476692Z Require stack:
2024-03-27T11:09:00.654479892Z - /home/site/wwwroot/node_modules/.bin/keystone
2024-03-27T11:09:00.654483292Z at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
2024-03-27T11:09:00.654486892Z at Module._load (node:internal/modules/cjs/loader:985:27)
2024-03-27T11:09:00.654490392Z at Module.require (node:internal/modules/cjs/loader:1235:19)
2024-03-27T11:09:00.654493592Z at Module.patchedRequire [as require] (/agents/nodejs/node_modules/diagnostic-channel/dist/src/patchRequire.js:16:46)
2024-03-27T11:09:00.654496992Z at require (node:internal/modules/helpers:176:18)
2024-03-27T11:09:00.654500192Z at Object.<anonymous> (/home/site/wwwroot/node_modules/.bin/keystone:3:1)
2024-03-27T11:09:00.654592594Z at Module._compile (node:internal/modules/cjs/loader:1376:14)
2024-03-27T11:09:00.654596594Z at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
2024-03-27T11:09:00.654599794Z at Module.load (node:internal/modules/cjs/loader:1207:32)
2024-03-27T11:09:00.654602994Z at Module._load (node:internal/modules/cjs/loader:1023:12) {
2024-03-27T11:09:00.654606194Z code: 'MODULE_NOT_FOUND',
2024-03-27T11:09:00.654609294Z requireStack: [ '/home/site/wwwroot/node_modules/.bin/keystone' ]
2024-03-27T11:09:00.654612694Z }
2024-03-27T11:09:00.661794111Z
2024-03-27T11:09:00.661839012Z Node.js v20.11.0
- Dominant language
- TypeScript
- Stars
- 10k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 38
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from keystonejs/keystone
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
keystonejs/keystone#10143 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
keystonejs/keystone#10141 ·
Maintainers usually reply within 1 day
-
[bug] List view search field becomes disabled when search returns no results, interrupting IME inputPossibly taken @ltxhhz claimed this 17 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
keystonejs/keystone#10097 ·
Maintainers usually reply within 1 day
-
Document Fields Demo page of docs refers to form that doesn't existMay be free again @Mthize claimed this 189 days ago, and no pull request is open. Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
keystonejs/keystone#9766 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 75/100
keystonejs/keystone#10142 ·
Maintainers usually reply within 1 day
All issues in keystonejs/keystone
Similar issues
-
🔨 tool 🧰 library
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Orange-OpenSource/Orange-Boosted-Bootstrap#4035 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
DISIC/teleservice-conformite#230 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
rothgar/rabble.radio#410 ·
Maintainers usually reply within 1 day
-
Docker > Volumes: sorting by Size does nothing, and text columns sort inconsistentlyPossibly taken @BitPluto claimed this today. Openneeds-triage🔍
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Dokploy/dokploy#6203 · 1 comment ·
Maintainers usually reply within 1 day
-
area/webapp comp/desktop P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#163341 · 2 comments ·
Maintainers usually reply within 1 day