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 build project in CI because project level npmrc is not respected. #8034

Open
kalbert312 opened this issue Apr 1, 2020 · 2 comments
Open

Comments

@kalbert312
Copy link

Bug description

Command

yarn install

What is the current behavior?

I'm trying to get a project building in CI. Yarn cache is cleaned.
I have the following file in the same directory I'm trying to run yarn install in with a scoped package in the package.json.

.npmrc

registry=https://ourinternalartifactory.com/artifactory/api/npm/our-registry-npm-virtual/
_auth=SOME_AUTH_TOKEN
always-auth=true
email=SOME_EMAIL
@our-scope:registry=https://ourinternalartifactory.com/artifactory/api/npm/our-registry-npm-virtual/
//ourinternalartifactory.com:443/artifactory/api/npm/our-registry-npm-virtual/:_password="SOME_PASSWORD"
//ourinternalartifactory.com:443/artifactory/api/npm/our-registry-npm-virtual/:username=SOME_EMAIL
//ourinternalartifactory.com:443/artifactory/api/npm/our-registry-npm-virtual/:email=SOME_EMAIL
//ourinternalartifactory.com:443/artifactory/api/npm/our-registry-npm-virtual/:always-auth=true

Locally, it works fine with this file at ~/.npmrc. However in the CI environment, it needs to be in the project workspace.

What is the expected behavior?

Should be effectively the same as a user based .npmrc.
Is there a yarnrc equivalent of this file I can generate? Artifactory only provides npm instructions.

Environment

  • Node Version: 10.16.3
  • Yarn v1 Version: 1.22.4
  • OS and version: macOS 10.15.4
@danieleades
Copy link

i'm seeing the same thing.

i'm also seeing some weird interaction with a project-level .yarnrc. I have both files with the same registry set (an NPM mirror and a private scoped registry). Auth credentials are set in the .yarnrc file only

  • if only the .npmrc file is present yarn is not picking up the private registries at all
  • if only the .yarnrc file is present the registries are resolved correctly, but there's no credentials
  • if both are present the private registries don't get picked up again

@krook1024
Copy link

krook1024 commented Jan 16, 2025

Any update on this? I'm still seeing the same things as decribed above in 1.22.22.

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

No branches or pull requests

3 participants