You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-5Lines changed: 14 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -83,38 +83,47 @@ Then you can import these fonts ether in your `main.ts` file or `global.css` fil
83
83
## Troubleshooting
84
84
85
85
### Unauthorized error
86
+
86
87
#### Context
88
+
87
89
You added this library as a dependency to your repository's package.json.
88
90
89
91
#### Possible Errors
92
+
90
93
-`error An unexpected error occurred: "https://npm.pkg.github.com/@hivemq%2fui-theme: unauthenticated: User cannot be authenticated with the token provided.".`
91
94
-`error An unexpected error occurred: "https://npm.pkg.github.com/download/@hivemq/ui-theme/0.2.0/ca9f1eaf504872aad12d56766542624d511169fa: Request failed \"401 Unauthorized\"".`
92
95
93
96
#### Resolution - try 1
97
+
94
98
1. Read the [Generate a new personal token for your GitHub user](https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token) guide
95
-
- Click on [Developer Settings](https://github.com/settings/apps) on GitHub, then on `Personal access tokens`.
96
-
- Choose `Generate new token (classic)`.
97
-
- In the scope, select at least `read:packages`.
98
-
- Remember to copy the generated token before it disappears.
99
+
* Click on [Developer Settings](https://github.com/settings/apps) on GitHub, then on `Personal access tokens`.
100
+
* Choose `Generate new token (classic)`.
101
+
* In the scope, select at least `read:packages`.
102
+
* Remember to copy the generated token before it disappears.
99
103
2. Save your new token to an environment variable (e.g. in `~/.bashrc` or `~/.zshrc`):
104
+
100
105
```bash
101
106
export NPM_TOKEN=${YOUR_TOKEN}
102
107
//npm.pkg.github.com/:_authToken=${YOUR_TOKEN}
103
108
```
109
+
104
110
where `${YOUR_TOKEN}` is the token you obtained from Github remember to refresh your terminal after adding the it. (e.g. `source ~/.bashrc` depending on your shell)
105
111
Note that with the second line, you should not need to run `npm login`.
106
112
107
-
3. Re-run your repository's installation step (e.g. `yarn install`).
113
+
1. Re-run your repository's installation step (e.g. `yarn install`).
108
114
109
115
#### Resolution - try 2
116
+
110
117
If the problem persists, you might need to log in to github.
111
118
112
119
From your `ui-theme` repo or the one you're importing `ui-theme` from, try to log in with github. Use your github username, and provide the new or updated token as the password:
0 commit comments