Nexus Local Repo (hosted)
npm (hosted)
name: npm-internal
$ npm pack --dry-run lodash
$ npm pack lodash
// Possible not needed
$ npm login --registry=https://192.168.1.9:8080/repository/npm-internal/
// When
// Unable to authenticate, need: BASIC realm="Sonatype Nexus Repository Manager"
$ npm config set strict-ssl false
$ npm config list
$ echo -n 'admin:admin123' | openssl base64
YWRtaW46YWRtaW4xMjM=
$ vi ~/.npmrc
strict-ssl=false
[email protected]
always-auth=true
_auth=YWRtaW46U29sbzROZXh0IQ==
$ npm publish lodash-4.17.21.tgz --registry=https://192.168.1.9:8080/repository/npm-internal/
$ npm init -y
$ npm install lodash --registry=https://192.168.1.9:8080/repository/npm-internal/
Materials:
https://help.sonatype.com/repomanager2/node-packaged-modules-and-npm-registries#NodePackagedModulesandnpmRegistries-EncodingCredentialsonLinux
https://levelup.gitconnected.com/deploying-private-npm-packages-to-nexus-a16722cc8166