Open sambaran69 opened 6 months ago
"Zip artifact for deployment" does not include all the files.
e.g.
ls -la
total 0
drwxr-xr-x 5 iamandrewluca staff 160 Apr 18 00:09 .
drwxr-xr-x 73 iamandrewluca staff 2336 Apr 18 00:09 ..
-rw-r--r-- 1 iamandrewluca staff 0 Apr 18 00:09 .file2
drwxr-xr-x 3 iamandrewluca staff 96 Apr 18 00:10 .folder
-rw-r--r-- 1 iamandrewluca staff 0 Apr 18 00:09 file1
This does not include all the files
zip -r file.zip ./*
adding: file1 (stored 0%)
This includes all the files
zip -r file2.zip ./
adding: .folder/ (stored 0%)
adding: .folder/test (stored 0%)
adding: file1 (stored 0%)
adding: .file2 (stored 0%)
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:
jobs: build: runs-on: ubuntu-latest
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
`
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 npm@9.6.4 2024-03-27T11:08:54.436281663Z npm info using node@v20.11.0 2024-03-27T11:08:54.797558523Z 2024-03-27T11:08:54.797591023Z > keystone-app@1.0.2 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