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

Cannot install private npm package as dependency #7256

Closed
Azrt opened this issue Apr 7, 2023 · 7 comments
Closed

Cannot install private npm package as dependency #7256

Azrt opened this issue Apr 7, 2023 · 7 comments

Comments

@Azrt
Copy link

Azrt commented Apr 7, 2023

Description

I've switched from 0.0.697 version of Bit and want to test the newest one, but i'm having an issue with my private npm package. Credentials are set in .npmrc correctly (previous version of Bit builds as expected), but after bit install I get 404 error:

GET https://gitlab.com/api/v4/projects/xxxx: Not Found - 404

No authorization header was set for the request.

Specifications

  • Bit version: 0.1.11
  • Node version: v16.18.1
  • npm / yarn version: 1.22.17
  • Platform: macOS 13.2
  • Bit compiler (include version):
  • Bit tester (include version):

Context and additional information

Maybe there was a breaking change somewhere between versions 0.0.827 and 0.0.1000, because first one is executing bit install command as expected, while second one throws same error.

@GiladShoham
Copy link
Member

Can you share your npmrc file (token stripped)
@zkochan fyi

@Azrt
Copy link
Author

Azrt commented Apr 7, 2023

Sure :)
Zrzut ekranu 2023-04-7 o 18 33 37

@itaymendel
Copy link
Contributor

Which component you are not able to install? the 404 you shared does not tell much.
Ideally we should be able to figure out, from your error, which package or component is not resolving correctly.

@Azrt
Copy link
Author

Azrt commented Apr 10, 2023

Ok soooo:

  • i am using private npm package stored in gitlab which is installed as dependency in workspace.jsonc
  • After switching to one of newer versions of bit i'm getting error below during bit install command:

Zrzut ekranu 2023-04-10 o 11 40 36

  • But, moving back to, for example version bvm use 0.0.827, everything is passing correctly :)

Zrzut ekranu 2023-04-10 o 11 45 08

@itaymendel
Copy link
Contributor

please see this ticket on gitlab

https://gitlab.com/gitlab-org/gitlab/-/issues/352962

also, please delete your lockfile

@zkochan
Copy link
Member

zkochan commented Jun 8, 2023

Does it help if you add the token like this in .npmrc?

//gitlab.com/api/v4/projects/:_authToken=${GITLAB_NPM_TOKEN}

source: npm/cli#3134 (comment)

@itaymendel
Copy link
Contributor

closing the issue as the original author stopped responding and several solution been suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants