[FOLIO-3509] npm publish fails in CI boxes after Node 16 upgrade Created: 20/May/22 Updated: 23/May/22 Resolved: 21/May/22 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Bug | Priority: | TBD |
| Reporter: | Zak Burke | Assignee: | Michal Kuklis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||||||
| Sprint: | DevOps Sprint 139 | ||||||||||||
| Development Team: | FOLIO DevOps | ||||||||||||
| RCA Group: | Related dependency upgrade | ||||||||||||
| Description |
|
Overview: After bumping Node from v12 to v16, the npm publish step now fails: npm ERR! code ENEEDAUTH npm ERR! need auth This command requires you to be logged in to https://repository.***.org/repository/npm-***ci/ npm ERR! need auth You need to authorize this machine using `npm adduser` npm ERR! A complete log of this run can be found in: npm ERR! /home/runner/.npm/_logs/2022-05-20T03_39_15_584Z-debug-0.log Error: Process completed with exit code 1. |
| Comments |
| Comment by Zak Burke [ 20/May/22 ] |
|
John Malconian, David Crossley, I was hoping this was a fluke, but I see the same failure in stripes-components so I think it's a side-effect, somehow, of the Node 16 upgrade. |
| Comment by Michal Kuklis [ 21/May/22 ] |
|
I see the same issues under ui-inventory
npm notice 736npm ERR! code ENEEDAUTH 737npm ERR! need auth This command requires you to be logged in to https://repository.***.org/repository/npm-***ci/ 738npm ERR! need auth You need to authorize this machine using `npm adduser` I wonder if this is somehow related to secrets.NPM_TOKEN https://github.com/folio-org/stripes-components/blob/master/.github/workflows/build-npm.yml#L178 I assume this is being set via github secrets
|
| Comment by David Crossley [ 21/May/22 ] |
|
I am away on holidays so cannot assist much, and am not proficient with our NPM repository. I did wonder about moving actions/setup-node to v3, but i see that Michal Kuklis recently tried that at ui-inventory to no avail. Also Ankita Sen might be able to assist. Perhaps someone should try upgrading one of the remaining Jenkins-using front-end repos (e.g. ui-organizations or ui-courses to use the new Node 16 Jenkins image
|
| Comment by Michal Kuklis [ 21/May/22 ] |
|
It appears like the newer version of npm which comes with node 16 changed the way the _auth is set via npm config and instead of setting it with: npm config _auth $NODE_AUTH_TOKEN we now have to use:
npm config set //repository.folio.org/repository/npm-folio/:_auth $NODE_AUTH_TOKEN
https://github.com/npm/cli/issues/3130#issuecomment-825793457 That seems to work: https://github.com/folio-org/stripes-components/pull/1803
|
| Comment by David Crossley [ 21/May/22 ] |
|
Good discovery. |