Hi, this morning a received an email from npmjs.org indicating that I need to switch imediately from
legacy access tokens to granular acces tokens or even better to use npm trusted publishing between github and npm via oidc.
In npm I created a trusted publisher for my github project and hence removed the npmtoken from my github actions release workflow. After doing that my release fails with the following error message:
error Error: Failed to replace env in config: ${NPM_TOKEN} at /usr/local/lib/node_modules/yarn/lib/cli.js:95453:13 at String.replace (<anonymous>) at envReplace (/usr/local/lib/node_modules/yarn/lib/cli.js:95448:16) at Function.normalizeConfig (/usr/local/lib/node_modules/yarn/lib/cli.js:31940:69) at NpmRegistry.<anonymous> (/usr/local/lib/node_modules/yarn/lib/cli.js:31970:34) at Generator.next (<anonymous>) at step (/usr/local/lib/node_modules/yarn/lib/cli.js:310:30) at /usr/local/lib/node_modules/yarn/lib/cli.js:321:13
As I'm using npx auto shipit --base-branch=main to ship my code to npm I suppose this error has something to do with auto not supporting npm trusted publishing at the moment.
Or am I completely wrong an I've just not configured the whole thing properly.
I'm really looking foward on any info and advice on this matter.
Thank you in advance,
Stefan
Hi, this morning a received an email from npmjs.org indicating that I need to switch imediately from
legacy access tokens to granular acces tokens or even better to use npm trusted publishing between github and npm via oidc.
In npm I created a trusted publisher for my github project and hence removed the npmtoken from my github actions release workflow. After doing that my release fails with the following error message:
error Error: Failed to replace env in config: ${NPM_TOKEN} at /usr/local/lib/node_modules/yarn/lib/cli.js:95453:13 at String.replace (<anonymous>) at envReplace (/usr/local/lib/node_modules/yarn/lib/cli.js:95448:16) at Function.normalizeConfig (/usr/local/lib/node_modules/yarn/lib/cli.js:31940:69) at NpmRegistry.<anonymous> (/usr/local/lib/node_modules/yarn/lib/cli.js:31970:34) at Generator.next (<anonymous>) at step (/usr/local/lib/node_modules/yarn/lib/cli.js:310:30) at /usr/local/lib/node_modules/yarn/lib/cli.js:321:13As I'm using
npx auto shipit --base-branch=mainto ship my code to npm I suppose this error has something to do with auto not supporting npm trusted publishing at the moment.Or am I completely wrong an I've just not configured the whole thing properly.
I'm really looking foward on any info and advice on this matter.
Thank you in advance,
Stefan