react-boilerplate / react-boilerplate-cra-template

:fire: Setup Create React App with React Boilerplate. Highly scalable & Best DX & Performance Focused & Best practices.
https://react-boilerplate.github.io/react-boilerplate-cra-template/
MIT License
1.87k stars 392 forks source link

yarn start gives error about styled-components with babel-plugin-macros. #216

Open ndasim opened 1 year ago

ndasim commented 1 year ago

Description

I started to try your project on my Mac OS, I followed your guidelines but couldn't start project due to following error. I tried npx instead of yarn but it has another issue with redux dependency. I'm putting error there:

yarn start returns following error:

Users/***/my-app/src/app/components/LoadingIndicator/index.tsx: styled-components tried to access babel-plugin-macros, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: babel-plugin-macros
Required by: styled-components@virtual:ddccc941eb8b35cd4b898a64351d8bba4ecc85eb47e8f1b36dce7852d6c3635665e0fc5464861f723d175edb2248ce0fa54dfefb9b5e4d2fdaef4b2353c4aa82#npm:5.3.5 (via /Users/***/my-app/.yarn/unplugged/styled-components-virtual-4f6dda2093/node_modules/styled-components/dist/)

Steps to reproduce

Steps to reproduce the behavior:

Versions

o2nitin commented 1 year ago

run below command to add babel-plugin-macros, then it will work yarn add babel-plugin-macros