Open lucasmonstrox opened 4 years ago
moving to the dedicated envs repo
@luqezman do you use typescript / flow with your react component? from the error, it looks like you use flow, but you use ts compiler. is that correct?
@GiladShoham Im using typescript 3.7.2 with CRA.
@luqezman Thanks for the update. let's wait for @qballer inputs. he developed the react-ts compiler.
Hi @GiladShoham thanks for quickly response.
Well to be honest I think this is a bug related with SC instead of BIT, I dont know. Probably 2 packages with conflicts, what you think?
@luqezman It won't surprise me. It doesn't look like a bit error. But it might be solved by passing configuration to the react-ts compiler.
@GiladShoham Do I need to have a react-ts compiler per bit component right? For that component Im using bit.envs/compilers/react-typescript@3.1.26
.
Since my component is using StyledComponents as dependency and my app is also using StyledComponents, looks like I have double installation of StyledComponents.
@GiladShoham should I need to have dist
|node_modules
folder of component installed inside src/components/{name}?
That might be a result of bug solved in v3.1.28, see more here - https://github.com/teambit/envs/issues/56 on a windows machine, it put the node_modules inside the dist folder of the component. please try again with v3.1.28 and let me know if it still happens. Thanks.
@GiladShoham I will try it today.
I change back to 3.0.35 version because is the last compatible with bit tag + bit import.
In 3.1.28 I cannot use bit tag anymore :(. Probably a windows issue.
@qballer can you take a look please?
News?
Maybe @Tallyb can help?
To start, styled components needs to be a singleton. Can you make sure styledComponents are defined as peerDependencies in your components? Explanation is here: https://docs.bit.dev/docs/react-guidelines#add-react-libraries-as-peer-dependencies-with-relaxed-versions
Thank guys <3
Styled-Component
Im working in a various frontends(I adopt a microfrontend architecture like auth, users, store, etc) and I use bit to reuse components and also, Im using CRA.
Im using styled components and each component like button/card have in package.json the styled-components package as dependency, example:
When I import the component to edit something before push a new tag, I cannot compile. The console produces the error below:
Steps to Reproduce
Expected Behavior
I just want to know why my code doest not run.
If I run without imports(only yarn isntall) everything works like a charm
Specifications
Additional context
I already tried to set the SC_DISABLE_SPEEDY or REACT_APP_SC_DISABLE_SPEEDY to true but no success.