Improve "Best Practices" regarding NODE_ENV
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- docker, node.js
- Domain
- documentation
Research direction
Start with the Best Practices guide at the linked section in docs/BestPractices.md and review how it describes NODE_ENV during Docker builds and runtime. Update the guidance to distinguish development builds from production runs and mention that multi-stage builds can use both; the documentation should clearly prevent devDependencies from being omitted during builds.
Written by the indexing model from the issue text.
Description
Problem
I just spent half a day trying to figure out, why trying to build an Angular project in Docker failed. I've followed the advice at Best Practices, not aware, that setting NODE_ENV to production causes npm not to install devDependencies.
Solution
The Best Practices guide should differentiate between using Node.js to build a Node.js based project (NODE_ENV=development) and to run a Node.js based project (NODE_ENV=production). Both can even be combined using multi-stage builds.
- Dominant language
- Dockerfile
- Stars
- 8.6k
- Forks
- 2k
- Avg merge
- 10h 19m
- Merged PRs (30d)
- 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nodejs/docker-node
-
build process docs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nodejs/docker-node#2564 · 2 comments ·
-
build process
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nodejs/docker-node#2437 ·
-
build process
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
nodejs/docker-node#2436 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nodejs/docker-node#1779 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nodejs/docker-node#1707 · 3 comments · 7 reactions ·
All issues in nodejs/docker-node
Similar issues
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
feature pydanty:is-working
Difficulty 1/5 Under an hour Newbie friendliness 88/100
pydantic/pydantic-ai#8647 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
:watch: Not Triaged dotnet-fsharp/svc
Difficulty 1/5 Under an hour Newbie friendliness 90/100