package fails for private npm modules
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, nodejs
- Domain
- cli
Research direction
Start at the node-lambda package command and trace how it launches the container and runs npm install --production. Determine how the NPM_TOKEN environment variable can reach that process, then verify that packaging succeeds for a package.json containing private npm modules.
Written by the indexing model from the issue text.
Description
Packaging with:
node-lambda package ...
will fail when package.json contains modules that are private on npm. I found a solution was to make a .npmrc file, put the following contents in it, and .gitignore it.
//registry.npmjs.org/:_authToken=00000000-0000-0000-0000-000000000000
However, as suggested on the npm docs, they recommend exporting an environment variable instead from your ~/.profile, or ~/.bashrc...
export NPM_TOKEN="00000000-0000-0000-0000-000000000000"
Then, use a NPM_TOKEN environment variable inside the .npmrc:
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
How does one pass the NPM_TOKEN environment variable into the node-lambda package container so that it can be available when it executes npm install --production?
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 185
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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 motdotla/node-lambda
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
motdotla/node-lambda#840 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
motdotla/node-lambda#641 · 6 comments · 2 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
motdotla/node-lambda#618 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 30/100
motdotla/node-lambda#544 · 1 reaction ·
-
question
Difficulty 4/5 3-5 days Newbie friendliness 25/100
motdotla/node-lambda#537 · 2 comments · 1 reaction ·
All issues in motdotla/node-lambda
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·