${npm_config_local_prefix} in project .npmrc
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
I see that the local prefix is loaded before the project-specific .npmrc file is loaded. So would it be possible to make ${npm_config_local_prefix} an environment variable that can be used in .npmrc?
Example use case for this in .npmrc:
node-options=--require ${npm_config_local_prefix}/project/path/to/module.js
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.
Research direction
Start at workspaces/config/lib/index.js around line 600 and trace how the local prefix and project .npmrc are loaded. Investigate whether npm_config_local_prefix can be made available during .npmrc expansion, using the issue's node-options example as the expected behavior; done means the variable resolves correctly in a project .npmrc.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100