Open BragdonD opened 1 year ago
Hi, thanks for the issue. Does the CI part work correctly? Also, it would be useful to have the logs of the job. You can find it in github actions section, by checking inside of each job.
@gonzaloetjo
All the jobs are passing successfully. It fails after the upload to azure platform:
But now even after recommitting to patch the redis url, my app is working fine at: https://devops-lab4.azurewebsites.net/ which can be test by doing: https://devops-lab4.azurewebsites.net/user/thomas
Plus I am not sure if it is now working due to the previous force npm install
This were the previous error:
Container devops-lab4_0_e5a09cec couldn't be started: Logs = 2023-10-03T18:01:30.305375164Z _____
2023-10-03T18:01:30.305408565Z / _ \ __________ _________ ____
2023-10-03T18:01:30.305415065Z / /_\ \\___ / | \_ __ \_/ __ \
2023-10-03T18:01:30.305420365Z / | \/ /| | /| | \/\ ___/
2023-10-03T18:01:30.305425465Z \____|__ /_____ \____/ |__| \___ >
2023-10-03T18:01:30.305430465Z \/ \/ \/
2023-10-03T18:01:30.305435465Z A P P S E R V I C E O N L I N U X
2023-10-03T18:01:30.305440165Z
2023-10-03T18:01:30.305444665Z Documentation: http://aka.ms/webapp-linux
2023-10-03T18:01:30.305449566Z NodeJS quickstart: https://aka.ms/node-qs
2023-10-03T18:01:30.305454266Z NodeJS Version : v18.17.1
2023-10-03T18:01:30.305458866Z Note: Any data outside '/home' is not persisted
2023-10-03T18:01:30.305463466Z
2023-10-03T18:01:31.984242546Z Starting OpenBSD Secure Shell server: sshd.
2023-10-03T18:01:32.768861214Z Starting periodic command scheduler: cron.
2023-10-03T18:01:33.002886924Z Could not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2023-10-03T18:01:33.004427047Z Could not find operation ID in manifest. Generating an operation id...
2023-10-03T18:01:33.004444747Z Build Operation ID: 115cd833-37a8-45c7-a05f-50d58641701d
2023-10-03T18:01:34.552568530Z Environment Variables for Application Insight's Pre-IPA Codeless Configuration exists..
2023-10-03T18:01:34.679373893Z Writing output script to '/opt/startup/startup.sh'
2023-10-03T18:01:34.814528286Z Running #!/bin/sh
2023-10-03T18:01:34.814586687Z
2023-10-03T18:01:34.814594287Z # Enter the source directory to make sure the script runs where the user expects
2023-10-03T18:01:34.814599387Z cd "/home/site/wwwroot"
2023-10-03T18:01:34.814604287Z
2023-10-03T18:01:34.814608987Z export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH
2023-10-03T18:01:34.814613888Z if [ -z "$PORT" ]; then
2023-10-03T18:01:34.814618688Z export PORT=8080
2023-10-03T18:01:34.814623588Z fi
2023-10-03T18:01:34.814628088Z
2023-10-03T18:01:34.814632588Z export NODE_OPTIONS='--require /usr/local/lib/node_modules/applicationinsights/out/Bootstrap/Oryx.js ' $NODE_OPTIONS
2023-10-03T18:01:34.814637288Z npm start
2023-10-03T18:01:51.415248988Z npm info using n******@9.6.4
2023-10-03T18:01:51.416886315Z npm info using n******@v18.17.1
2023-10-03T18:01:51.557683017Z
2023-10-03T18:01:51.557860020Z > e******@1.0.0 start
2023-10-03T18:01:51.557872920Z > node src/index.js
2023-10-03T18:01:51.557878620Z
2023-10-03T18:01:52.843617846Z npm http fetch GET 200 https://registry.npmjs.org/npm 1238ms (cache updated)
2023-10-03T18:01:53.025390019Z npm http fetch GET 200 https://registry.npmjs.org/npm 1496ms (cache updated)
2023-10-03T18:01:53.217676963Z node:internal/modules/cjs/loader:1080
2023-10-03T18:01:53.217710064Z throw err;
2023-10-03T18:01:53.217716764Z ^
2023-10-03T18:01:53.217721764Z
2023-10-03T18:01:53.217726464Z Error: Cannot find module 'depd'
2023-10-03T18:01:53.217891967Z Require stack:
2023-10-03T18:01:53.217899767Z - /home/site/wwwroot/node_modules/body-parser/index.js
2023-10-03T18:01:53.217904067Z - /home/site/wwwroot/node_modules/express/lib/express.js
2023-10-03T18:01:53.217908867Z - /home/site/wwwroot/node_modules/express/index.js
2023-10-03T18:01:53.217913667Z - /home/site/wwwroot/src/index.js
2023-10-03T18:01:53.217918467Z at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
2023-10-03T18:01:53.217922667Z at Module._load (node:internal/modules/cjs/loader:922:27)
2023-10-03T18:01:53.217927367Z at Module.require (node:internal/modules/cjs/loader:1143:19)
2023-10-03T18:01:53.217932067Z at Module.patchedRequire [as require] (/usr/local/lib/node_modules/applicationinsights/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
2023-10-03T18:01:53.217936768Z at require (node:internal/modules/cjs/helpers:121:18)
2023-10-03T18:01:53.217941968Z at Object. (/home/site/wwwroot/node_modules/body-parser/index.js:14:17)
2023-10-03T18:01:53.217946968Z at Module._compile (node:internal/modules/cjs/loader:1256:14)
2023-10-03T18:01:53.217951268Z at Module._extensions..js (node:internal/modules/cjs/loader:1310:1
=======[LONG LOG TRUNCATED BY DETECTOR]======
I have the same issue:
Though the pipeline is passed but it failed to be installed on the Azure App Service.
This is my pipeline configuration:
# Node.js with React Pipeline
# Build a Node.js project that uses React using Azure DevOps.
trigger:
- dev
pool:
vmImage: ubuntu-latest
stages:
- stage: Install
displayName: "Install"
jobs:
- job: InstallJob
displayName: "Install Node.js and Dependencies"
steps:
- task: NodeTool@0
inputs:
versionSpec: "^20.x"
displayName: "Install Node.js"
- script: |
npm install -g pnpm
pnpm install
displayName: "Install Dependencies"
- stage: Tests
displayName: "Run Unit and Component Tests"
jobs:
- job: TestsJob
displayName: "Run Unit and Component Tests"
steps:
- script: |
npm install -g pnpm
pnpm install
pnpm test
pnpm cypress-run-component
displayName: "Run Unit and Component Tests"
- stage: Build
displayName: "Build Application"
jobs:
- job: BuildJob
displayName: "Build Application"
steps:
- script: |
npm install -g pnpm
pnpm install
pnpm build
displayName: "Build Application"
- stage: ArchiveAndPublish
displayName: "Archive and Publish Artifacts"
jobs:
- job: ArchiveAndPublishJob
displayName: "Archive Build Artifacts and Publish"
steps:
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: "."
includeRootFolder: false
archiveType: "zip"
archiveFile: "$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip"
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: "$(Build.ArtifactStagingDirectory)"
ArtifactName: "drop"
publishLocation: "Container"
I am encountering a severe difficulty to deploy the web app to microsoft azure, it keeps telling me that dependencies cannot be found...
I try to switch to npm as packet manager but I still get the same problem.
The only option I found is going into the debug console and run npm install manually there and restart the web app. But at this point it is no more CD, since it requires a human interaction...
Does anyone have an idea of how to solve this? Is it a bug or just I am doing something wrong?
Below are my files: package.json:
azure.yaml:
CI delivery:
PS: Those are the files to run npm since I tried npm as last resort...