-
Notifications
You must be signed in to change notification settings - Fork 219
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
project's .npmrc not respected #58
Comments
Check for `npmrc` in project root first then check in HOME directory. If it's not found at either place then create one in the project root instead of the HOME directory to be on a safer side and not tampering the HOME directory fixes changesets#58
I found that using I had to replace my |
Update Explanation: I wonder if Maybe someone can explain if this is true or clear up any misunderstanding. |
Currently release is failing to publish new packages. NPM isn't being especially helpful in the errors that it is returning, but it looks like an auth issue. (https://github.com/hackoregon/civic/runs/1440736362?check_suite_focus=true) This comment indicates that adding a NODE_AUTH_TOKEN may solve this issue. changesets/action#58 (comment)
Set `NODE_AUTH_TOKEN` env because `actions/setup-node` writes .npmrc and use the environment variable as the auth token. changesets/action#58 (comment)
Set `NODE_AUTH_TOKEN` env because `actions/setup-node` writes .npmrc and use the environment variable as the auth token. changesets/action#58 (comment)
For a CI action to be hard-coded to only check As a workaround I opted to change the # changesets/action presumes the .npmrc is in $HOME
# See:
# - https://github.com/changesets/action/issues/58
# - https://github.com/changesets/action/blob/2bb9bcbd6bf4996a55ce459a630a0aa699457f59/src/index.ts#L58
- name: Set HOME
run: echo "HOME=$(pwd)" >> $GITHUB_ENV Edit: use env:
HOME: ${{ github.workspace }} |
Right now if you have an
.npmrc
at the project root that is not respected but rather the following piece of code just checks the.npmrc
in the HOME directoryaction/src/index.ts
Lines 44 to 53 in cd904b9
Even the ideal flow for npm or any process is they check for
.npmrc
at the project root if not then they look for.npmrc
in the HOME directory.The text was updated successfully, but these errors were encountered: