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

yarn@0.16.1 fails with "TypeError: Cannot use 'in' operator to search for <version> in undefined #1406

Closed
mikechabot opened this issue Oct 24, 2016 · 1 comment

Comments

@mikechabot
Copy link

What is the current behavior?
$ yarn command fails with the output below:

mchabot@XG01484 MINGW64 /c/_workspaces/xg-web (branching)
$ yarn
yarn install v0.16.1
info No lockfile found.
[1/4] Resolving packages...
error An unexpected error occured, please open a bug report with the information provided in "C:\\_workspaces\\xg-web\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Attached: yarn-error.zip
Attached: npm-resolver.zip

Error excerpt (yarn-error.log):

Trace: 
  TypeError: Cannot use 'in' operator to search for '^0.9.1' in undefined
      at C:\Users\mchabot\AppData\Roaming\npm\node_modules\yarn\lib\resolvers\registries\npm-resolver.js:62:24
      at next (native)
      at step (C:\Users\mchabot\AppData\Roaming\npm\node_modules\yarn\node_modules\babel-runtime\helpers\asyncToGenerator.js:17:30)
      at C:\Users\mchabot\AppData\Roaming\npm\node_modules\yarn\node_modules\babel-runtime\helpers\asyncToGenerator.js:35:14
      at new Promise (C:\Users\mchabot\AppData\Roaming\npm\node_modules\yarn\node_modules\core-js\library\modules\es6.promise.js:191:7)
      at C:\Users\mchabot\AppData\Roaming\npm\node_modules\yarn\node_modules\babel-runtime\helpers\asyncToGenerator.js:14:12
      at Function.findVersionInRegistryResponse (C:\Users\mchabot\AppData\Roaming\npm\node_modules\yarn\lib\resolvers\registries\npm-resolver.js:72:7)
      at C:\Users\mchabot\AppData\Roaming\npm\node_modules\yarn\lib\resolvers\registries\npm-resolver.js:89:34
      at next (native)
      at step (C:\Users\mchabot\AppData\Roaming\npm\node_modules\yarn\node_modules\babel-runtime\helpers\asyncToGenerator.js:17:30)

What is the expected behavior?
$yarn install should create yarn.lock and install the project dependencies.

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

  • yarn@0.16.1
  • NodeJs: v5.2.0
  • Windows 7 (Service Pack 1)
@wyze
Copy link
Member

wyze commented Oct 24, 2016

This message indicates a malformed response from the registry. A friendly message has been added in #1356.

@wyze wyze closed this as completed Oct 24, 2016
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

No branches or pull requests

2 participants