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 add doesn't install latest version #27

Open
ghost opened this issue Dec 7, 2020 · 3 comments
Open

Yarn add doesn't install latest version #27

ghost opened this issue Dec 7, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 7, 2020

Describe the bug
Following the steps in documentation to add styled-wind installs older version(0.0.0-beta.7) of the package. This version has some bugs, thus the examples given in the docs don't work as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Create a fresh create-react-app project : npx create-react-app styled-wind-sandbox
  2. Move into the project directory and yarn add styled-wind@beta styled-components
  3. Change contents of src/App.js to following
import styled from "styled-wind";

function App() {
  return <StyledContainer>Styled-wind</StyledContainer>;
}

const StyledContainer = styled.div`
     background: red;
    margin-top: 10px;
    .text-blue-600; 
    .lg:text-green-600; 
    .hover:bg-yellow; 
    .pt-10; 
`;

export default App;
  1. Some of the styling doesn't appear

Expected behavior
I have checked with the latest version (13), in codesandbox all of them seem to work. We expect yarn add should install latest working version available. It will be easier for people to just start to play with the project.

Desktop:

  • OS: macOS Big Sur version 11.0.1
  • Browser: Firefox 83.0
  • Version : 0.0.0-beta.7

Additional context
Tis' my First Issue here. So suggestions are welcome!! Like if it is valid, etc.

@ameerthehacker
Copy link
Member

@ArjithN true this is a major issue, not sure whether this has something to do with yarn itself. What is the story with npm, did you get a chance to check?

@ghost
Copy link
Author

ghost commented Dec 8, 2020

No, I didn't check before. But now when I tried to use npm in new project, I get this error

 > npm i styled-wind@beta styled-components                                                                                                       12:07pm
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: sws@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0.0" from styled-wind@0.0.0-beta.7
npm ERR! node_modules/styled-wind
npm ERR!   styled-wind@"0.0.0-beta.7" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/arjithn/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/arjithn/.npm/_logs/2020-12-08T06_37_56_823Z-debug.log

Looks like its trying to install same version as yarn's. But why it fails.. I have no clue.

@ameerthehacker
Copy link
Member

@ArjithN I think because we have peer dependency which looks for react 16 and ur latest cra is using react 17, need to fix this

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

1 participant