Skip to content

Clarify that private scoped packages are not supported #407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

summer4096
Copy link

Scoped packages are a pretty common use case, and searching the internet for "yarn scoped packages" brings people to issues like yarnpkg/yarn#521 which generally end with a comment saying that scoped packages are now supported. Since they are not supported, I think adding this line to the website could save people some time.

@Daniel15
Copy link
Member

Daniel15 commented Mar 7, 2017

Aren't public scoped packages supported? There's some issues in Git Bash on Windows (see yarnpkg/yarn#2785) but I thought it worked fine in most other environments. Perhaps this should clarify that private scoped packages are not supported?

@summer4096
Copy link
Author

Good point! Updated the PR.

@ghost
Copy link

ghost commented Mar 7, 2017

What does private scoped packages mean?

Do you mean fetching scoped packages from a registry that requires user authentication?

I ask because private can, in my mind, imply a private company registry, where authenticate is not required.

In that scenario scoped packages are supported by yarn.

@summer4096
Copy link
Author

Private scoped packages, in this context, would mean scoped packages that require authentication to download. The phrase can be interpreted differently, however, there is some prior use of the phrase which is fairly common and well understood. The word "private" certainly doesn't lend itself to any particular implementation of privacy, but using the same phrase to describe different things is bound to be confusing.

@summer4096 summer4096 changed the title Clarify that scoped packages are not supported Clarify that private scoped packages are not supported Mar 8, 2017
@seamusabshere
Copy link

Yarn does not support scoped packages requiring authentication (a.k.a., private scoped packages) at this time.

@Daniel15
Copy link
Member

Daniel15 commented Mar 8, 2017

@seamusabshere's version sounds good to me!

@shakefu
Copy link

shakefu commented Mar 14, 2017

This is confusing. I'm currently using yarn with a lot of scoped, private packages on NPM's registry and it works fine. Is that just coincidence that it happens to work? Or are you going to be removing that capability?

@summer4096
Copy link
Author

@shakefu maybe you could send a PR that documents this capability? I haven't gotten it to work, haven't found any documentation for it, and haven't heard of anybody else who has. Officially supporting it would probably be better than documenting that it isn't supported.

@shakefu
Copy link

shakefu commented Mar 20, 2017

@devtristan I'm not familiar with the actual doc repo to be able to easily make a PR otherwise I'd be happy to. Maybe you could point me in the right direction?

But here's a quick snippet I copy+pasted showing yarn working fine with privately scoped repository packages, provided you have logged in with npm login. Maybe that doesn't actually count as supported by Yarn? It does work, however, and I'm not sure if it's possible to Node without NPM these days so it should work for everyone.

# File and hostname specifics replaced with <SNIP> to protect the innocent (me)

$ yarn cache clean
yarn cache v0.21.3
success Cleared cache.
✨  Done in 7.17s.

$ rm -R ~/.npmrc ~/.yarnrc node_modules

$ yarn install
yarn install v0.21.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@<SNIP>/<SNIP>-4.31.1.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "<SNIP>/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

$ yarn login
yarn login v0.21.3
question npm username: shakefu
question npm email: shakefu@<SNIP>
✨  Done in 10.65s.

$ yarn install
yarn install v0.21.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@<SNIP>/<SNIP>-4.31.1.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "<SNIP>/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

$ rm -R ~/.npmrc ~/.yarnrc node_modules

$ npm login
Username: shakefu
Password:
Email: (this IS public) shakefu@<SNIP>
Logged in as shakefu on https://registry.npmjs.org/.

$ yarn install
yarn install v0.21.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
✨  Done in 9.66s.

$

@bestander
Copy link
Member

That was a bug, I think we fixed it.

@bestander bestander closed this May 19, 2017
@motss
Copy link

motss commented May 19, 2017

It returns 403 error still and am using latest yarn.

@Haroenv
Copy link
Member

Haroenv commented May 19, 2017

For what package @motss ?

@bestander
Copy link
Member

bestander commented May 19, 2017

Still it is better to fix the bug than declare a defeat :)
If you have time to debug and help the project with the fix that would be great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants