-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package fails for private npm modules #415
Comments
I would add to this that |
Hi all, revitalizing this issue because it is still not clear how to install private packages with
I am using yarn 1.22.4 on node v16.20.2 on an M1 Mac (same issue appears in Github Actions runner). I have added an
And my CI process passes Unfortunately, the only reason I find it necessary to install private packages this way is that node-lambda doesn't seem to handle local imports without a bundling step, and it actually seemed simpler to just put my shared code in a private package than to add a bundling step to all 15 of my lambdas. If there is a better way to bundle local dependencies, I would love to hear about that as well! Thanks! |
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.However, as suggested on the npm docs, they recommend exporting an environment variable instead from your
~/.profile
, or~/.bashrc
...Then, use a
NPM_TOKEN
environment variable inside the.npmrc
:How does one pass the
NPM_TOKEN
environment variable into thenode-lambda package
container so that it can be available when it executesnpm install --production
?The text was updated successfully, but these errors were encountered: