react-boilerplate-cra-template
react-boilerplate-cra-template copied to clipboard
yarn start gives error about styled-components with babel-plugin-macros.
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:
- Install latest node js & yarn
- Run following command: yarn create react-app --template cra-template-rb my-app
- cd my-app/; yarn start
Versions
- react-boilerplate-cra-template: 1.2.6
- Node/NPM: v19.3.0
- Browser: ?
run below command to add babel-plugin-macros, then it will work
yarn add babel-plugin-macros