Bird
0
0

You wrote this Dockerfile for Remix:

medium📝 Debug Q14 of 15
Remix - Deployment
You wrote this Dockerfile for Remix:
FROM node:18
COPY . /app
WORKDIR /app
CMD ["npm", "run", "start"]

But the app crashes on start with missing dependencies error. What is the problem?
AWORKDIR should come before COPY
BYou forgot to run npm install to install dependencies
CCMD syntax is incorrect
DNode version 18 is not supported by Remix
Step-by-Step Solution
Solution:
  1. Step 1: Check Dockerfile steps for dependency install

    The Dockerfile copies files but never runs npm install, so dependencies are missing.
  2. Step 2: Confirm impact on app start

    Without dependencies installed, the app crashes on start due to missing packages.
  3. Final Answer:

    You forgot to run npm install to install dependencies -> Option B
  4. Quick Check:

    Missing npm install causes crash = A [OK]
Quick Trick: Always run npm install before starting app in Docker [OK]
Common Mistakes:
MISTAKES
  • Thinking COPY order causes error
  • Blaming CMD syntax
  • Assuming Node 18 unsupported

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Remix Quizzes