Add documentation for GET of private NPM packages
See original GitHub issueGetting a 404 error when trying to fetch a private NPM package. The NPM_TOKEN is included and used as a secret. Locally I also have this problem sometimes but the issue is resolved by doing a npm login
.
workflow:
name: Node CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js v10.x
uses: actions/setup-node@v1
with:
version: 10.x
- name: npm install, build, and test
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
npm install
npm run build --if-present
npm test
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Creating and publishing private packages - npm Docs
On the command line, navigate to the root directory of your package. cd /path/to/package ; To publish your private package to the npm...
Read more >Using private npm packages - Expo Documentation
Learn how to configure EAS Build to use private npm packages. ... The recommended way is to add the NPM_TOKEN secret to your...
Read more >Installing private npm modules · Gemfury Dev Center
You can use your Registry URL to install packages individually. First, you need to configure npm authentication to enable access to your private...
Read more >Create Your Own NPM Package — Private or Public - Medium
You were looking for a documentation on how to create your own package in NPM, ... will get to know how can you...
Read more >Install private packages · Cloudflare Pages docs
In your Pages project's Settings > Environment variables, add a new environment variable named NPM_TOKEN to the Production and Preview ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t see any npm docs saying
NPM_AUTH_TOKEN
is supported. With that said, you can configure auth with this action. There are examples in the README, but in this case you would want:Note the added registry parameter for the action and the change of the env var name to NODE_AUTH_TOKEN.
Without a registry parameter we don’t configure auth by default.
Or, we could add a
envKey
input to setup-node which defaults to “NODE_AUTH_TOKEN” and then as an end user you could make the variable whatever you wanted!And, of course, you can always do:
🙃