teambit / envs

Component development environments for the Bit community
https://bit.dev/bit/envs
Other
63 stars 9 forks source link

'disable' of undefined error when Bit import the compiler and run build directly #74

Closed JoshK2 closed 4 years ago

JoshK2 commented 4 years ago

Describe the bug

I created a simple project in React&TypeScript, so I use the React-TypeScript compiler. When I run build after the component is tracked and the compiler is still not imported but configured in the bit object I get this error: image

But, after the first try, if I run again bit build it's working.

Steps to Reproduce

  1. npx create-react-app check-error --typescript
  2. Create and track a component.
  3. Add compiler config;
    "env": {
      "compiler": "bit.envs/compilers/react-typescript@3.1.28"
    },
  4. Run bit build, it will import the compiler and then build the component, you should get the same error as me.

Screenshots, exceptions and logs

Here you can see that the second try is working well. If applicable, add screenshots, exceptions, and logs to help explain your problem. image

Specifications