vercel / vercel/ncc

Support setting NODE_PATH

Open
#520 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
9.8k
Forks
326
PR merge metrics
No merged PRs in 30d

Description

I use NODE_PATH=lib when I run/build my software so that I don't have the ../../../../somedir/somefile.js issue.

It doesn't look as if there is a way of setting this for NCC yet, and as a result, I end up with module not found when I try to run the compiled codebase.

Ideally ncc will allow environment variables to be passed in on the command line, or have some other way of passing them to the build.

Contributor guide

No contributing guide indexed for this repository

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 by locating NCC's command-line build entry point and its module-resolution handling, since the issue names no specific files or tests. Compare how NODE_PATH is used during the source build and when running the compiled output; done means a documented, tested way to pass or honor the requested environment setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.