Skip to content

When local .npmrc is found the action still says No .npmrc file found, creating one #89

Description

@kamleshchandnani

Here's the repo where I have local .npmrc which is being considered but the changesets action still says.

No .npmrc file found, creating one

Here's the output message from running action

I got confused that it isn't picking up local my .npmrc even though it is. I think the messaging can be bit more contextual if it finds my local .npmrc. So I think we can change the messaging a bit.

Activity

  1. zthxxx commented on Jan 2, 2022

    @zthxxx

    +1

  2. Andarist commented on Jan 2, 2022

    @Andarist
    Member

    @zthxxx I believe that the issue was addressed some time ago. Please take a look at my comment here. If you still believe there is an issue with the latest code then please open a new issue describing the actual and expected results.

  3. zthxxx commented on Jan 2, 2022

    @zthxxx

    Project here has the .npmrc, but in changsets/action step also say “not found”.

    Action file is release.yml

  4. Andarist commented on Jan 2, 2022

    @Andarist
    Member

    This project has project-level .npmrc file - the log is about the lack of the user-level file.

  5. zthxxx commented on Jan 2, 2022

    @zthxxx

    This project has project-level .npmrc file - the log is about the lack of the user-level file.

    yes, I known that, just will make a little confused

  6. Andarist commented on Jan 2, 2022

    @Andarist
    Member

    How would you phrase this message to be less confusing? I'm open to suggestions.

  7. zthxxx commented on Jan 2, 2022

    @zthxxx

    maybe log with prefix “user-level”?

  8. zthxxx commented on Jan 10, 2022

    @zthxxx

    I believe that the issue was addressed some time ago. Please take a look at my comment here. If you still believe there is an issue with the latest code then please open a new issue describing the actual and expected results.

    @Andarist I have opened a new issue #132 that relate to this issue with more deeper reason.

  9. elyobo commented on Oct 7, 2025

    @elyobo

    How would you phrase this message to be less confusing? I'm open to suggestions.

    If there's a project level .npmrc present then I would skip logging and creating the user level file, as AFAIK it's redundant and so the log makes it appear that something is wrong when it's probably fine.

  10. Andarist commented on Oct 8, 2025

    @Andarist
    Member

    Feel free to open a PR with the suggested change and explanation behind it.

  11. elyobo commented on Oct 8, 2025

    @elyobo

    I've opened a PR with my thinking (see above), but noting for anyone else that comes past is that a workaround to silence the potentially confusing warning, if you're writing your own .npmrc, is to write it to ~/.npmrc instead of ./.npmrc.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions