Yarn: error An unexpected error occurred: "https://registry.npm.taobao.org/react-native-image-gallery-scroll: unauthorized"

Created on 24 Jul 2017  Â·  3Comments  Â·  Source: yarnpkg/yarn

I want to publish js package to yarn, and follow it "https://yarnpkg.com/zh-Hans/docs/creating-a-package".When i use "yarn publish",it always prompt me that :

## error An unexpected error occurred: "https://registry.npm.taobao.org/react-native-image-gallery-scroll: unauthorized".

i don't know why,please help me ,thanks.

yarn's version: v0.27.5

Most helpful comment

because you are using registry.taobao.org as your registry..... you should use https://registry.npmjs.org/

so.. that means you can use taobao registry to "download only" packages.. but you cant use it to publish your packages... u can change it by:

npm config set registry https://registry.npmjs.org/

or maybe you also could do it by _(i havent tested this yet)_

npm publish --registry https://registry.npmjs.org/

All 3 comments

because you are using registry.taobao.org as your registry..... you should use https://registry.npmjs.org/

so.. that means you can use taobao registry to "download only" packages.. but you cant use it to publish your packages... u can change it by:

npm config set registry https://registry.npmjs.org/

or maybe you also could do it by _(i havent tested this yet)_

npm publish --registry https://registry.npmjs.org/

@milewski thanks for answer,I will try it。

because you are using registry.taobao.org as your registry..... you should use https://registry.npmjs.org/

so.. that means you can use taobao registry to "download only" packages.. but you cant use it to publish your packages... u can change it by:

npm config set registry https://registry.npmjs.org/

or maybe you also could do it by _(i havent tested this yet)_

npm publish --registry https://registry.npmjs.org/

thanks for the answer,it solved the problem.

Was this page helpful?
0 / 5 - 0 ratings