product-ride / styled-wind

A magical implementation of tailwind-like classnames into styled-components.

Home Page:https://styled-wind.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yarn add doesn't install latest version

opened this issue · comments

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.

@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?

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.

@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