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

Fix version key typo on install.js #1828

Merged
merged 1 commit into from
Nov 14, 2016

Conversation

kevinzwhuang
Copy link
Contributor

@kevinzwhuang kevinzwhuang commented Nov 14, 2016

Summary

yarn install is broken for the latest nightly, v0.18.0 - introduced by a typo from #1429
There is a typo in install.js in the latest nightly where the version key for yarn is spelled as verison.

const {verison: YARN_VERSION, installationMethod: YARN_INSTALL_METHOD} = require('../../../package.json');

This results in YARN_VERSION being undefined and causing errors down the script. Such as:

Trace:
  TypeError: Cannot read property 'indexOf' of undefined
      at Install.checkUpdate (/usr/share/yarn/lib/cli/commands/install.js:906:21)
      at /usr/share/yarn/lib/cli/commands/install.js:466:14
      at next (native)
      at step (/usr/share/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
      at /usr/share/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
      at Promise.F (/usr/share/yarn/node_modules/core-js/library/modules/_export.js:35:28)
      at /usr/share/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12
      at Install.init (/usr/share/yarn/lib/cli/commands/install.js:580:7)
      at /usr/share/yarn/lib/cli/commands/install.js:55:21
      at next (native)

Test plan

Simply fixing the typo to version corrects the behavior for yarn install, as such:

const {version: YARN_VERSION, installationMethod: YARN_INSTALL_METHOD} = require('../../../package.json');

cc: @kittens @bestander

adamdicarlo referenced this pull request Nov 14, 2016
… version available (#1429)

* Add automatic check for updates that nags the user when there's a new version available - fixes #1138

* remove self-update

* add support for updating yarn to tarball installer

* use new installationMethod package.json value to output update command

* address comments from @Daniel15

* remove self update tests
@bestander bestander merged commit 8ead0c7 into yarnpkg:master Nov 14, 2016
@kevinzwhuang
Copy link
Contributor Author

Thanks @bestander!

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.

2 participants