emotion: Code base does not "just work" when cloned (on Windows?)

Hi there, I’ve got 8 years experience of professional software development, but only ~4 months of experience on modern JS stack, so it’s very possible that this is entirely mistakes or lack of knowledge about yarn / npm on my part, but I would hope that I was capable of following basic Setup steps for an OS project.

Even if the error is with me, it seems likely that the documentation could be improved to cater to other dummies who still want to Contribute, and I’m happy to submit a PR for that … once I know what the solution is … 😃


I wanted to raise a pretty trivial code feature PR for emotion, so I forked and cloned the project. I expected to be able to just run it and have everything work perfectly before I made my changes, but that isn’t the case - if you just follow the direct instructions you get a bunch of warnings followed by an enormous collection of errors and test failures.

Details:

Versions:

  • emotion version: current master as of 29/09/2018. (looks like npm pkg version 9.2.10. Commit: 0fdabe.)
  • react version: (N/A: This is a bug with the library development, not its usage)
  • node version: v10.10.1
  • npm version: 6.4.1
  • yarn version: 1.10.1

What you did: git clone run Yarn installer from here: https://yarnpkg.com/en/docs/install#windows-stable run yarn from the root of the cloned repo. run yarn test from the root of the repo.

I believe the above sequence represents the instructions as currently given on the CONTRIBUTE page and then ran yarn from the root of my clone.

What happened:

yarn (which I assume to be roughly equivalent to npm install?) generated the following set of 17 peer-dependency warnings:

warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > create-emotion-styled@9.2.8" has unmet peer dependency "prop-types@15.x".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > emotion-theming@9.2.9" has unmet peer dependency "prop-types@15.x".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > @emotion/native@9.2.9" has unmet peer dependency "prop-types@15.x".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > @emotion/native@9.2.9" has unmet peer dependency "react-native@>=0.14.0 && < 1".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > @emotion/primitives-core@9.2.9" has unmet peer dependency "prop-types@15.x".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > @emotion/primitives@9.2.10" has unmet peer dependency "prop-types@15.x".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > @emotion/primitives@9.2.10" has unmet peer dependency "react-primitives@^0.5.1".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > @emotion/native > react-native@0.57.0" has incorrect peer dependency "react@16.5.0".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > emotion-site > favicons-webpack-plugin@0.0.9" has unmet peer dependency "webpack@^1.13.0 || ^2.0.0 || ^3.0.0 || ^4.0.0".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > emotion-site > gatsby-remark-prismjs@3.0.0-beta.3" has unmet peer dependency "prismjs@^1.13.0".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > emotion-site > worker-loader@2.0.0" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0-alpha.0 || ^4.0.0".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > emotion-site > graphql-type-json@0.1.4" has unmet peer dependency "graphql@>=0.4.0".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > benchmarks > react-native-web@0.8.8" has unmet peer dependency "react-art@16.x.x".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > emotion-site > gatsby > babel-loader@8.0.0-beta.0" has incorrect peer dependency "webpack@2 || 3".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > emotion-site > gatsby > babel-plugin-remove-graphql-queries@2.0.2-beta.4" has incorrect peer dependency "graphql@^0.11.7".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > emotion-site > worker-loader > schema-utils@0.4.5" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
warning "workspace-aggregator-498a386e-835c-4f6f-ac4d-c847ab622954 > @emotion/native > react-native > metro > metro-visualizer > antd > rc-editor-mention@1.1.7" has unmet peer dependency "immutable@^3.7.4".

yarn test then generated about a minute and a half of scrolling screen errors, with the final punchline:

Snapshot Summary
 › 166 snapshots failed from 23 test suites. Inspect your code changes or run `yarn run coverage -u` to update them.

Test Suites: 35 failed, 49 passed, 84 total
Tests:       284 failed, 17 skipped, 692 passed, 993 total
Snapshots:   166 failed, 617 passed, 783 total
Time:        97.817s
Ran all test suites.

To be clear, all of this is from a blank, untouched git clone of a fork of the emotion code base.

Reproduction: N/A

Problem description: The repo should JustWork when cloned for development, and/or should Document how to get it working properly.

Suggested solution: My first guess is that to get this all working I need to install some necessary dependencies. If that’s correct then I suspect the correct solution is to declare those as dev dependencies? Failing that, then we should be providing notes on what is necessary in the CONTRIBUTING.md file.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 40 (20 by maintainers)

Most upvoted comments

@Brondahl Should work on Windows now 😃