@caselaw-elibrary/common
v1.0.15
Published
Logout from any existing npm sessions to avoid conflicts:
Readme
How to Login
Prerequisites
Logout from any existing npm sessions to avoid conflicts:
npm logoutStep 1: Generate a New npm Access Token
You must generate a new access token on the npm website with specific permissions.
- Log in to your account on the npm website.
- Navigate to Account Settings (your profile icon in the top right).
- Select Access Tokens from the menu.
- Click the "Generate New Token" button.
- Configure the Token:
- Token Type: Select "Publish". This grants the token the ability to publish new packages and versions.
- Crucial Step: Ensure you check the box for "Bypass 2FA for publishing" (or a similarly worded option). This is the key requirement to resolve the
E403error without an OTP.
- Click "Generate Token" and immediately copy the token that is displayed. You will not be able to view it again.
Step 2: Configure the Token in Your Environment
You need to tell the npm CLI to use this new token when communicating with the registry.
Option A: Local .npmrc File (Development)
Run the following command in your terminal, replacing <YOUR_NEW_TOKEN> with the token you copied in Step 1.
npm set //registry.npmjs.org/:_authToken <YOUR_NEW_TOKEN>