AZ-400 Practice Question: Design and implement build and release pipelines
Your team uses GitHub Actions to build and deploy a Node.js application to Azure App Service. The deployment succeeds, but the app crashes after startup with an error indicating a missing module. The build artifact includes the node_modules folder. What is the most likely cause?
⚠ Common exam trap
Test-takers frequently assume a missing module error always means the file wasn't included in the artifact, but in this scenario the node_modules folder is present, so the real issue is ABI incompatibility between the build and runtime Node.js versions.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The Node.js version on the runner differs from the App Service runtime, causing native module incompatibility.
The most likely cause is that the Node.js version on the GitHub Actions runner differs from the version on Azure App Service, leading to native module incompatibility. Native modules (e.g., those using node-gyp) are compiled against the specific Node.js ABI (Application Binary Interface) of the build environment. If the runtime version differs, the compiled .node binaries will fail to load, resulting in a 'missing module' error even though the node_modules folder is present in the artifact.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The .gitignore file excludes node_modules from the artifact.
Why it's wrong here
A .gitignore rule only prevents files from being tracked in source control; it does not prevent a build step from copying node_modules into the deployment artifact. Since the artifact is described as including node_modules, the module crash cannot be caused by Git ignoring that folder.
- ✓
The Node.js version on the runner differs from the App Service runtime, causing native module incompatibility.
Why this is correct
The runner and Azure App Service runtime must use the same Node.js major version (or at least a compatible ABI) for native modules such as bcrypt or sharp. If the workflow builds with a different Node.js version than the App Service runtime, those native addons are compiled against incompatible V8/N-API binaries and fail to load at startup, producing a 'module not found' or similar crash.
- ✗
The workflow YAML has an indentation error that causes the deploy step to fail silently.
Why it's wrong here
A YAML indentation error in a GitHub Actions workflow would cause the workflow to fail during parsing or at the step that has invalid syntax, and the failure would be clearly visible in the Actions run logs. It would not cause a deploy step to fail silently or lead to a runtime missing-module crash on the App Service.
- ✗
The build step does not run npm ci, so the package-lock.json is ignored.
Why it's wrong here
Even without npm ci, the npm install command used in build steps still reads package-lock.json to resolve dependency versions, and it would install all required packages into node_modules. Omitting npm ci might reduce reproducibility, but it would not omit dependencies from the artifact and therefore would not cause a module to be missing at runtime.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Environment
An environment is a dedicated set of computing resources, configurations, and services used to develop, test, or host software applications in a controlled and repeatable way.
Key term
Build artifact
A build artifact is the packaged, deployable output created by a build process, such as a compiled binary, ZIP file, or container image, that is stored for later use in testing or release.
About these practice questions
One of 823 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.