Skip to content
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

README should explain what to do about "authentication token not provided" during npm install #152

Closed
pdurbin opened this issue Jul 26, 2023 · 3 comments · Fixed by #242
Closed
Assignees
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows Size: 3 A percentage of a sprint. 2.1 hours.

Comments

@pdurbin
Copy link
Member

pdurbin commented Jul 26, 2023

The first command in the README (npm install) fails with this:

npm ERR! 401 Unauthorized - GET https://npm.pkg.github.com/download/@IQSS/dataverse-client-javascript/2.0.0-pr67.5dfc70a/dc27a9a220a347fb9e5d87f6887c8e87427482c1 - authentication token not provided

We should update the README to explain what to do.

Some notes:

read:packages

https://iqss.slack.com/archives/C04MJ76A34Z/p1685557309486369?thread_ts=1685556469.110549&cid=C04MJ76A34Z

@pdurbin
Copy link
Member Author

pdurbin commented Jul 26, 2023

This is what worked for me:

cp .npmrc.example .npmrc

Then edit and fill in YOUR_GITHUB_AUTH_TOKEN with a classic token you create with read:packages. See https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-to-github-packages

I didn't set up YOUR_NPM_AUTH_TOKEN. I don't think I need it.

legacy-peer-deps=true

# design-system registry
//registry.npmjs.org/:_authToken=<YOUR_NPM_AUTH_TOKEN>
@iqss:registry=https://registry.npmjs.org/

# js-dataverse registry
//npm.pkg.github.com/:_authToken=<YOUR_GITHUB_AUTH_TOKEN>
@iqss:registry=https://npm.pkg.github.com/

@aadorian
Copy link

aadorian commented Aug 2, 2023

registry.npmjs.org/:_authToken=<YOUR_NPM_AUTH_TOKEN

I have the same issue, and solve it commenting with hashtag # the registry lines #registry.npmjs.org/:_authToken=<YOUR_NPM_AUTH_TOKEN

@pdurbin
Copy link
Member Author

pdurbin commented Nov 1, 2023

@aadorian thanks. Do you think the README is fine as-is? if not, are you interested in making a pull request?

@GPortas GPortas added the Size: 3 A percentage of a sprint. 2.1 hours. label Nov 22, 2023
@GPortas GPortas added pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows labels Nov 27, 2023
@GPortas GPortas moved this to SPRINT READY in IQSS Dataverse Project Nov 27, 2023
@GPortas GPortas moved this from SPRINT READY to Clear of the Backlog in IQSS Dataverse Project Nov 27, 2023
@MellyGray MellyGray self-assigned this Nov 29, 2023
@MellyGray MellyGray linked a pull request Nov 29, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows Size: 3 A percentage of a sprint. 2.1 hours.
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

4 participants