Skip to content
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

Help - package not find with yarn but ok with npm #6123

Closed
Inateno opened this issue Jul 19, 2018 · 5 comments
Closed

Help - package not find with yarn but ok with npm #6123

Inateno opened this issue Jul 19, 2018 · 5 comments
Assignees

Comments

@Inateno
Copy link

Inateno commented Jul 19, 2018

Hi,

I'm new to yarn and I create a project using yarn workspace along Lerna, I was previously using npm and everything was working, decided to try yarn to optimize the process of "install".

So far everything is great, I just have an issue with "babel-plugin-transform-decorators-legacy" and/or "babel-plugin-transform-decorators" (tried both):

yarn install v1.7.0
[1/4] Resolving packages...
error Couldn't find package "babel-plugin-transform-decorators-legacy" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I tried a simple "yarn install" (reading from packages.json) and a "yarn add" (with -W) both are failing while "npm i" works.
Maybe there is something about cache or a registry stuff npm include by default and yarn doesn't?

Thanks.

@ghost ghost assigned rally25rs Jul 19, 2018
@ghost ghost added the triaged label Jul 19, 2018
@rally25rs
Copy link
Contributor

It's working for me at the moment

/Projects/yarn-test 🐒   yarn add babel-plugin-transform-decorators-legacy
yarn add v1.7.0
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...

success Saved lockfile.
success Saved 22 new dependencies.

is this still an issue for you?

@Inateno
Copy link
Author

Inateno commented Jul 23, 2018

Still the issue yes, is there something to configure somewhere maybe?
We have a local cache server, but it's running fine with npm, maybe there is a difference on the call with yarn??

image

PS: I have to precise that I've been running the same issue with several packages, so it's not related to "babel-plugin-transform-decorators-legacy" I suppose (rollup, other babel plugins...).

@GvRillaer
Copy link

Same Issue here...

@Inateno
Copy link
Author

Inateno commented Jul 30, 2018

Hey, just to say that a mate in my office didn't have the problem.

I'm not sure if there is a local-cache related stuff (npm, temps files? dunno).
But since I'm not an isolated case, I let this issue open. Sounds like a weird issue!

Temporary solution: For those who have this problem, just manually do "npm i mystuff" in the root, once the workspace is set up by yarn, it's not a problem and works fine.

@arcanis
Copy link
Member

arcanis commented Oct 2, 2018

Likely fixed by #6413 (working on a release at the moment, will probably reach rc by tomorrow).

The error message ("Couldn't find package") is triggered when Yarn doesn't get any output from the NPM registry, which is actually quite often (there's a significant amount of requests that ends in 500).

I'm not sure exactly why it occured on this package in particular (maybe something related to their sharding?), and I can't even reproduce it myself, but looking at the symptoms (the error message, the randomness of the failure, the similarity with other errors we got on our CI due to this problem) that's what makes the most sense.

I'm going to close this issue, but feel free to reopen if you see it again.

@arcanis arcanis closed this as completed Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants