package fails for private npm modules

Aperta
#415 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, nodejs
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement question

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?

Lingua principale
JavaScript
Stelle
1.4k
Fork
185
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di motdotla/node-lambda

Tutte le issue di motdotla/node-lambda

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.