envs
envs copied to clipboard
Support for the experimental syntax 'classProperties' isn't currently enabled
Hi, i have imported a bit component in my reactjs project. After that i have imported the component in a render but it always give me this error:
`SyntaxError: '' Support for the experimental syntax 'classProperties' isn't currently enabled (52:11):
Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation. ` To import a bit component i have followed this steps:
- bit init
- bit import
- npm run start
Specifications
- Bit version: 14.7.6
- Node version:10.19.0
- npm / yarn version:6.14.4
- Platform: Windows 10, reactjs project
- Bit compiler (include version):bit.envs/compilers/[email protected]
- Bit tester (include version):
I have tried to add babel but in react js react-script manage everything... so i cannot change babel or webpack configuration. There is a way to use bit without eject the project from react-script?
Do you have a compiler defined for your component? Or it's a 3rd part component? can you share a link to the component? Our official react compiler does support it. see here - https://bit.dev/bit/envs/compilers/react/~code#.babelrc
Hi, Here is the component: https://bit.dev/tech4care/basiccomponents/button-group
if i import the component i will always get the same error, but i have setted the right compiler.
And if i try to run it:
Maybe i'm missing something?
Hi i have another error with another component:
Link: https://bit.dev/tech4care/basiccomponents/filtered-table/
i made: bit init bit import {component}
npm run start and i get this error:
Instead if i make npm install {component}
Everything work
@drakonkat Both issues are unrelated. I'm moving this issue to the envs repo. Please open a new issue (on bit repo) about the diff between import and npm install.