-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Tags:
-
Sprint:nxGang Sprint 11.1.13
-
Story Points:2
Right now, the slave's .npmrc file binds the @nuxeo scope to mavenin via @nuxeo:registry=https://mavenin.nuxeo.com/nexus/repository/npmjs-nuxeo/. However, this makes it harder to publish @nuxeo scoped packages to different registries, since this configuration overrides the --registry=... cli option during publish. As a consequence, in order to publish to the public registry and mavenin, we need to do the following:
npm config set @nuxeo:registry https://mavenin.nuxeo.com/nexus/repository/npmjs-nuxeo/ npm publish npm config set @nuxeo:registry https://registry.npmjs.org/ npm publish --access public npm config set @nuxeo:registry https://mavenin.nuxeo.com/nexus/repository/npmjs-nuxeo/
However, this might create some issues in the rare event of two or more concurrent jobs trying to install/publish npm packages at the same time. Removing the @nuxeo:registry=https://mavenin.nuxeo.com/nexus/repository/npmjs-nuxeo/ from the npm config file will allow the --registry to be used to publish to different registries:
npm publish --registry=https://mavenin.nuxeo.com/nexus/repository/npmjs-nuxeo/ npm publish --access public --registry=https://registry.npmjs.org/