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

React 16 support? #26

Open
pencilcheck opened this issue Oct 16, 2017 · 4 comments
Open

React 16 support? #26

pencilcheck opened this issue Oct 16, 2017 · 4 comments

Comments

@pencilcheck
Copy link

pencilcheck commented Oct 16, 2017

Error in ./ReactMount
Module not found: Error: Can't resolve 'react/lib/React' in '/Project/node_modules/react-fittext/node_modules/react-dom/lib'
@vieira
Copy link

vieira commented Oct 12, 2018

Hello @pencilcheck

It seems to be working for me:

{
  "name": "chatloader-react",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^16.4.2",
    "react-dom": "^16.4.2",
    "react-fittext": "1.0.0",
    "react-router-dom": "^4.3.1",
    "react-scripts": "1.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}
import React from 'react';
import ReactFitText from 'react-fittext';
import logo from './logo.svg';
import './App.css';

const App = ({ title }) => (
  <div className="App">
    <header className="App-header">
      <img src={logo} className="App-logo" alt="logo" />
      <h1 className="App-title">{ title }</h1>
    </header>
    <ReactFitText>
      <p>Testing React Fittext Testing React Fittext Testing React Fittext</p>
    </ReactFitText>
  </div>
);

export default App;

@damiangreen
Copy link

Will this get released?

@damiangreen
Copy link

I've created a library that solves this, that works with react 16+ and allows for resizing of components https://github.com/damiangreen/isomorphic-react-fittext

@anselmoshim
Copy link

anselmoshim commented Jul 1, 2022

I'm getting the same issue when I am on React 16+

Please update this package to support React 16 and 17!

npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^16.8.6" from the root project
npm ERR!   peer react@">=16.0.0" from @ant-design/[email protected]
npm ERR!   node_modules/@ant-design/icons
npm ERR!     @ant-design/icons@"^4.0.0" from the root project
npm ERR!     @ant-design/icons@"^4.2.1" from @ant-design/[email protected]
npm ERR!     node_modules/@ant-design/pro-card
npm ERR!       @ant-design/pro-card@"1.20.11" from @ant-design/[email protected]
npm ERR!       node_modules/@ant-design/pro-components
npm ERR!         @ant-design/pro-components@"^1.1.7" from the root project
npm ERR!       3 more (@ant-design/pro-table, @ant-design/pro-list, @ant-design/pro-table)
npm ERR!     15 more (@ant-design/pro-layout, @ant-design/pro-table, antd, ...)
npm ERR!   162 more (@ant-design/pro-card, @ant-design/pro-components, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.0" from [email protected]
npm ERR! node_modules/react-fittext
npm ERR!   react-fittext@"^1.0.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"^15.0.0" from [email protected]
npm ERR!   node_modules/react-fittext
npm ERR!     react-fittext@"^1.0.0" 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.```

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

4 participants