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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn fails on some packages #6520

Open
lhorie opened this issue Oct 9, 2018 · 13 comments
Open

yarn fails on some packages #6520

lhorie opened this issue Oct 9, 2018 · 13 comments
Assignees
Labels

Comments

@lhorie
Copy link

lhorie commented Oct 9, 2018

Do you want to request a feature or report a bug?

bug

What is the current behavior?

Yarn fails to install @xtuc/long

If the current behavior is a bug, please provide the steps to reproduce.

> yarn add @xtuc/long
yarn add v1.10.1
[1/5] 馃攳  Validating package.json...
[2/5] 馃攳  Resolving packages...
error Couldn't find package "@xtuc/long@4.2.1" required by "@webassemblyjs/wast-parser@1.7.8" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Couldn't find package "@xtuc/long@4.2.1" required by "@webassemblyjs/leb128@1.7.8" on the "npm" registry.
    at MessageError.ExtendableBuiltin (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:243:66)
    at new MessageError (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:272:123)
    at PackageRequest.<anonymous> (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:33701:17)
    at Generator.throw (<anonymous>)
    at step (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:98:30)
    at /usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:111:13
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
Error: Couldn't find package "@xtuc/long@4.2.1" required by "@webassemblyjs/wast-printer@1.7.8" on the "npm" registry.
    at MessageError.ExtendableBuiltin (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:243:66)
    at new MessageError (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:272:123)
    at PackageRequest.<anonymous> (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:33701:17)
    at Generator.throw (<anonymous>)
    at step (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:98:30)
    at /usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:111:13
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
Error: Couldn't find package "@xtuc/ieee754@^1.2.0" required by "@webassemblyjs/ieee754@1.7.8" on the "npm" registry.
    at MessageError.ExtendableBuiltin (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:243:66)
    at new MessageError (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:272:123)
    at PackageRequest.<anonymous> (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:33701:17)
    at Generator.throw (<anonymous>)
    at step (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:98:30)
    at /usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:111:13
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)

> yarn info @xtuc/long versions
yarn info v1.10.1
error Received invalid response from npm.

> npm info @xtuc/long versions
npm http request GET https://registry.yarnpkg.com/@xtuc%2flong
npm http 200 https://registry.yarnpkg.com/@xtuc%2flong
[ '4.0.0', '4.1.0', '4.2.0', '4.2.1' ]

What is the expected behavior?

The package should get installed

Please mention your node.js, yarn and operating system version.

Node v8.12.0
Yarn v1.10.1
MacOS v10.12.6

@ghost ghost assigned torifat Oct 9, 2018
@ghost ghost added the triaged label Oct 9, 2018
@lhorie
Copy link
Author

lhorie commented Oct 9, 2018

More troubleshooting notes:

  • Running yarn from a repo containing the offending package in a yarn.lock to regenerate node_modules also throws the same error
  • Installing the package via npm works fine
  • removing .npmrc from the project's root folder fixes the issue. The contents of my .npmrc were:
registry=https://registry.yarnpkg.com

@NullDivision
Copy link

This looks like the same issue as mine.

#6517

@fzxt
Copy link

fzxt commented Oct 9, 2018

Resolved it by commenting out all the contents in my .npmrc.

@thisconnect
Copy link

I just ran into the same issue, facebook/create-react-app#5389

@Keasoub
Copy link

Keasoub commented Oct 24, 2018

I have the same issue :(

@thisconnect
Copy link

@floydy123 fyi, temporally removing the .npmrc helped and let me install everything normally see facebook/create-react-app#5389 (comment)

@djalexd
Copy link

djalexd commented Nov 15, 2018

Same issue here, these are my versions:

Node v10.0.0
Yarn v0.27.5
MacOS v10.13.6

Temporarily removing the .npmrc file solved the issue! It's not a solution, but worked for me :)

@paul-sachs
Copy link

This seems to be still a thing:

yarn info @svgr/babel-plugin-add-jsx-attribute
Node v8.15.0
Yarn v1.13
Mac v10.13.6

@paul-sachs
Copy link

paul-sachs commented Feb 14, 2019

Seems my .npmrc file has an _auth property which is causing the issue, somehow. I needed that _auth property because artifactory is a terrible npm registry, but it's what i got.

@mmanske3D
Copy link

Seeing the same issue. We have a private npm registry which needs authentication. Removing _auth for the private registry resolved the issue, but I'm unable use both.

@EbramTawfik
Copy link

@ihalila removing .npmrc dir Users/you/.npmrc. fixes the issue.

@paul-sachs
Copy link

@EbramTawfik I hesitate to call it a "fix". It is a very temporary workaround. Once you need to install another package from a protected scope (for a new version or if you've cleared your cache, or for a fresh install) it will break again.

@mahsaghn
Copy link

i have already had this issue, It's solved just by removing yarn.lock and then enter command yarn install in terminal

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

No branches or pull requests