Skip to content

Workaround for yarn interdependency conflicts#20805

Merged
tylersmalley merged 2 commits intoelastic:masterfrom
tylersmalley:fix-node-modules
Jul 16, 2018
Merged

Workaround for yarn interdependency conflicts#20805
tylersmalley merged 2 commits intoelastic:masterfrom
tylersmalley:fix-node-modules

Conversation

@tylersmalley
Copy link
Member

@tylersmalley tylersmalley commented Jul 14, 2018

Developers are running into issues when switching branches, usually resulting in needing to run yarn kbn clean to resolve. This is a really odd issue @spalger has reproduced https://github.com/spalger/reproduce-issues/tree/master/yarn-breaks-deps-of-linked-modules and is working on opening an issue for Yarn.

Install dependencies on 6.x branch:

  • git checkout 6.x
  • yarn kbn clean
  • cd packages/kbn-es
  • install dependencies in kbn-es and x-pack: yarn; cd ../../x-pack; yarn; cd ../packages/kbn-es

Move to master:

  • git checkout master
  • update kbn-es: yarn

Check the kbn-es package and ansi-styles nested dependency

  • cat node_modules/ansi-styles/package.json (note the version)
  • yarn check

update x-pack: cd ../../x-pack; yarn; cd ../packages/kbn-es

Re-check the kbn-es package and ansi-styles nested dependency

  • cat node_modules/ansi-styles/package.json (note the version)
  • yarn check

... weird, right?

Resolves: #20771

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend adding kbn-es to the list of packages checked by eslint for dependencies: https://github.com/elastic/kibana/blob/master/.eslintrc.js#L93-L108

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@elastic elastic deleted a comment from elasticmachine Jul 15, 2018
@elastic elastic deleted a comment from elasticmachine Jul 15, 2018
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@tylersmalley tylersmalley merged commit 46bacc6 into elastic:master Jul 16, 2018
tylersmalley added a commit to tylersmalley/kibana that referenced this pull request Jul 16, 2018
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
tylersmalley added a commit that referenced this pull request Jul 16, 2018
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"yarn es snapshot" fails on Windows 7

3 participants