stencil icon indicating copy to clipboard operation
stencil copied to clipboard

bug: I can't publish Stencil components to NPM

Open reuel88 opened this issue 5 years ago • 4 comments

Prerequisites

Stencil Version

2.7.0

Current Behavior

I can't publish Stencil components to NPM. I even created a new stencil component project didn't even write anything and tried to publish to NPM. and I'm getting this error

npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/<component-name> - Forbidden
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

Which doesn't make sense because it a new project. no new dependencies or anything.

Expected Behavior

That we can publish to NPM.

Steps to Reproduce

node: v16.13.0 nvm: 8.1.0

npm init stencil
cd <project-name>
npm install
npm build
npm login
npm publish --access public

Receive error

Code Reproduction URL

https://github.com/reuel88/reuel-components

Additional Information

No response

reuel88 avatar Nov 23 '21 06:11 reuel88

I see you are missing an = between access and public

npm publish --access=public should do ya provided you are not using the name of a package that exists (or other NPM permission settings)

cjtangney avatar Nov 23 '21 14:11 cjtangney

@cjtangney Thank you for your response but it did not work.

reuel88 avatar Nov 23 '21 22:11 reuel88

Odd. I was able to publish to npm following the steps outlined above as recently as this morning, utilizing the most recent version of Stencil.

I would double check that you are correctly logged into npm via the command line and also ensure that there are no packages which exist by the name outlined in your package.json

It may also be worth namespacing your package -- @reuel88/reuel-components to ensure that there is no conflict with an existing package.

cjtangney avatar Nov 23 '21 22:11 cjtangney

Thanks for the issue! This issue appears to be a support request. We use this issue tracker exclusively for bug reports and feature requests. Please use our slack channel for questions about Stencil.

Thank you for using Stencil!

ionitron-bot[bot] avatar Nov 24 '21 03:11 ionitron-bot[bot]