zzarcon / ts-react-toolbox

Opinionated toolbox boilerplate to create Typescript React components 🛠:package:
MIT License
23 stars 5 forks source link

Improve documentation #24

Open soswow opened 2 years ago

soswow commented 2 years ago

Here is what I did:

nvm install 12
rm -rf *
rm .*
npm install yarn -g
yarn init
yarn add ts-react-toolbox -D
yarn node_modules/.bin/ts-react-toolbox init

Running it throws

Module not found: Error: Can't resolve 'styled-components' in '/Users/sasha/hobby/portfolio/website/node_modules/react-gh-corner/dist'

Going up to result of yarn add I can see it tells me:

warning "ts-react-toolbox > eslint-config-airbnb@18.2.1" has unmet peer dependency "eslint-plugin-react-hooks@^4 || ^3 || ^2.3.0 || ^1.7.0".
warning "ts-react-toolbox > react-gh-corner@1.1.2" has unmet peer dependency "styled-components@^3.3.2".

as well as 5 of

warning "ts-react-toolbox > enzyme-adapter-react-16@1.15.6" has incorrect peer dependency "react@^16.0.0-0".
warning "ts-react-toolbox > enzyme-adapter-react-16@1.15.6" has incorrect peer dependency "react-dom@^16.0.0-0".
warning "ts-react-toolbox > react-gh-corner@1.1.2" has incorrect peer dependency "react@^16.3.0".
warning "ts-react-toolbox > ts-jest@27.1.2" has incorrect peer dependency "jest@^27.0.0".
warning "ts-react-toolbox > enzyme-adapter-react-16 > enzyme-adapter-utils@1.14.0" has incorrect peer dependency "react@0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0".
warning "ts-react-toolbox > enzyme-adapter-react-16 > react-test-renderer@16.14.0" has incorrect peer dependency "react@^16.14.0".
warning "ts-react-toolbox > enzyme-adapter-react-16 > enzyme-adapter-utils > airbnb-prop-types@2.16.0" has incorrect peer dependency "react@^0.14 || ^15.0.0 || ^16.0.0-alpha".

After adding all these missing peer dependencies and incorrect ones, I had to still add react-gh-corner and @emotion/react because they are used in example.

zzarcon commented 2 years ago

Mate, so sorry about that. I recently migrated into Emotion and seems like I had styled-components leftovers, so my projects were still building...

I just removed styled-components from react-gh-corner and bumped the version in here, so there should be no issue with that at least now

zzarcon commented 2 years ago

Also bumped enzyme and the enzyme adapter to the relevant React version (17) and jest + ts-jest. Thanks for the patience, let me know if any other issue occurs