[Docs] `process.loadEnvFile()` does not document behaviour when variables already exist
Maintainers usually reply within 1 day
@Sepandard is already working on this.
Since Sep 26, 2026.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 90/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
- Domain
- documentation
Research direction
Start with the process.loadEnvFile(path) section in the affected process API documentation and compare its environment-variable behavior with the --env-file documentation. Document that an existing process.env value takes precedence and is not overwritten by the .env file.
Written by the indexing model from the issue text.
Description
Affected URL(s)
https://nodejs.org/docs/latest/api/process.html#processloadenvfilepath
Description of the problem
The documentation for process.loadEnvFile(path) states that the .env file is loaded into process.env, but does not document what happens when a variable already exists in process.env.
The --env-file documentation states that an existing environment variable takes precedence over a value from the file.
process.loadEnvFile() appears to have the same behaviour, but this is not stated in its API documentation.
Please document the precedence behaviour for process.loadEnvFile(), for example:
If a variable is already defined in
process.env, its existing value takes precedence and is not overwritten by the value from the.envfile.
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 39.9k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 234
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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/node
-
Docs: --watch-path *is* supported on linuxPossibly taken @motokaneyuki claimed this 4 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 82/100
nodejs/node#66743 · 1 reaction ·
Maintainers usually reply within 1 day
-
node:internal/inspector/network_http: `TypeError: Missing dataLength` in event when response uses `setEncoding()`Possibly taken @lazerg claimed this 13 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nodejs/node#66551 · 1 comment ·
Maintainers usually reply within 1 day
-
Stream.prototype.forEach will block in first promise in queue before read more chunkPossibly taken @mmustafasenoglu claimed this 24 days ago. Opendoc
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
nodejs 26.8.2 fails to build with clang/LLVMMay be free again @btyagi18 claimed this 10 days ago, and no pull request is open. Openbuild
Difficulty 1/5 Under an hour Newbie friendliness 88/100
nodejs/node#66076 · 2 comments ·
Maintainers usually reply within 1 day
-
`TextEncoder.encodeInto()` underfills the destination for some non-ASCII textPossibly taken @XadillaX claimed this 37 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
nodejs/node#65994 · 2 comments · 2 reactions ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
maintenance
Difficulty 1/5 Under an hour Newbie friendliness 75/100
alphagov/accessible-autocomplete#826 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
olahol/react-tagsinput#229 ·
-
[BUG] npm pkg delete removes the first array item for a nonexistent propertyPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
jonathanong/no-mistakes#2260 · 1 comment ·
Maintainers usually reply within 1 day