nodejs / nodejs/docker-node

docs(BestPractices.md): add dependency caching guide

Open Beginner friendly
#1,101 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Dockerfile
Stars
8.6k
Forks
2k
Avg merge
10h 19m
Merged PRs (30d)
16

Description

To avoid performing npm install again and again when any source code in the project is being modified, it's (always?) preferred to cached node_modules as long as package.json and package-lock.json are not changed. I think this can be added to the BestPractices.md guide. Welcome for discussions on whether this is really a good practice also.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with BestPractices.md and review the existing guidance around dependency installation and image builds. Confirm the intended practice for caching node_modules when package.json and package-lock.json are unchanged, then document it with the relevant npm install context. Done means the guide clearly explains the caching approach and its conditions.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.