Hello,
I am trying to pipe a internal npm using pipeline for the first time
started with https://confluence.atlassian.com/bitbucket/deploy-to-npm-967317547.html
my bitbucketpipelines.yml looks like
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- npm install
- npm run lint
- npm audit --audit-level=moderate
- export NODE_ENV=test
- npm test
branches:
master:
- step:
script: # Modify the commands below to build your repository.
- npm install
- npm run lint
- npm audit --audit-level=moderate
- export NODE_ENV=test
- npm test
- step:
name: Publish
deployment: production
script:
- npm version minor -m "Upgrade to %s [skip ci]"
- git push && git push --tags
- pipe: atlassian/npm-publish:0.2.0
variables:
NPM_TOKEN: $NPM_LOGIN_TOKEN
I set up NPM_LOGIN_TOKEN in the pipeline variables.
I created it by npm login and then npm token create
the error my pipeline gets is
npm publish .
npm WARN invalid config registry="my-internal-registry.local"
npm WARN invalid config Must be a full url with 'http://'
npm notice
npm notice package: my-url-config@0.4.0
npm notice === Tarball Contents ===
npm notice 983B package.json
npm notice 228B .babelrc
npm notice 1.5kB .eslintrc
npm notice 884B bitbucket-pipelines.yml
npm notice 198B jasmine.json
npm notice 118B README.md
npm notice 8.1kB src/index.js
npm notice 387B src/index.test.js
npm notice === Tarball Details ===
npm notice name: my-url-config
npm notice version: 0.4.0
npm notice package size: 2.8 kB
npm notice unpacked size: 12.4 kB
npm notice shasum: 7d9bc791097a2743203cf97477e0ce33bf4fd905
npm notice integrity: sha512-H5A7AW6N/v3Y5[...]ssqmrE0Qom4oA==
npm notice total files: 8
npm notice
npm ERR! code ENEEDAUTH
npm ERR! need auth auth required for publishing
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! /root/.npm/_logs/2020-03-13T20_47_55_346Z-debug.log
✖ Failed to publish package "my-url-config@0.4.0".
Thanks for any help
I would suspect the warning about the registry is the key pointer here, so probably if you can address that, do that first (I'm not fluent with npm so, in case this is just a warning that's given by design, ignore my comment on it).
Additionally if you add /root/.npm/_logs/ for a pipeline asset you can look into the npm debug log to get more detailed information. Maybe that helps?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.