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

Access @eqworks open source (only) npm packages with .npmrc not working #51

Open
geoerika opened this issue Jan 13, 2021 · 1 comment
Open

Comments

@geoerika
Copy link
Contributor

geoerika commented Jan 13, 2021

Working PR: #52

We tried configuring a .npmrc file at the root of the project with @eqworks:registry=https://registry.npmjs.org/ to instruct npm/yarn to look for @EQWorks scoped npm packages on the public npmjs registry.
https://eqworks.slack.com/archives/CFR7TDMJQ/p1610042809165400

When running github workflows we got the following error: https://github.com/EQWorks/react-maps/runs/1696693862?check_suite_focus=true
0s Run yarn publish --tag alpha yarn publish --tag alpha shell: /bin/bash -e {0} env: NPM_CONFIG_USERCONFIG: /home/runner/work/_temp/.npmrc NODE_AUTH_TOKEN: *** yarn publish v1.22.5 [1/4] Bumping version... info Current version: 0.4.2 [2/4] Logging in... error No token found and can't prompt for login when running with --non-interactive. info Visit https://yarnpkg.com/en/docs/cli/publish for documentation about this command. Error: Process completed with exit code 1.

Specific steps were taken to fix this error, found here:
actions/setup-node#81
https://eqworks.slack.com/archives/GKL2UL4E6/p1610550652102400
https://eqworks.slack.com/archives/GKL2UL4E6/p1610563156121000

Things tried:

  • bumped the setup-node action version to v2
  • remove always-auth
  • added - run: echo "@eqworks:registry=https://npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc

Final workflow config for testing:
name: Node.js Package - alpha tag on: push: tags: - 'v*-alpha*' jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: 12.x - run: yarn install - uses: actions/setup-node@v2 with: node-version: 12.x registry-url: https://npm.pkg.github.com/ scope: '@eqworks' always-auth: true - run: echo "@eqworks:registry=https://npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc - run: yarn publish --tag alpha env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: actions/setup-node@v2 with: node-version: 12.x registry-url: https://registry.npmjs.org/ scope: '@eqworks' always-auth: true - run: yarn publish --tag alpha env: NODE_AUTH_TOKEN: ${{ secrets.CD_NPM_TOKEN_PUBLISH }}

All these trials haven't fix the issue.

@vxsl
Copy link

vxsl commented Mar 16, 2022

encountered the same issue in lumen-table, seem to have resolved it with the following workflow steps:

https://github.com/EQWorks/lumen-table/blob/2e7168058e44492eeeb8eb1d338b7b2c84aa372d/.github/workflows/npm-alpha.yml#L12-L43

perhaps the only relevant different is .npmrc instead of ~/.npmrc. Not sure


refs:

slack
actions/setup-node#81 (comment)
actions/setup-node#52 (comment)

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

2 participants