envs
envs copied to clipboard
react-typescript: Cannot find module '../../components/core/capsule'
Describe the bug
Unable to compile a component with react-typescript env.
Steps to Reproduce
- Create an app with create-react-app with Typescript
npx create-react-app my-app --template typescript
- Put react and react-dom as peer dependencies
-
bit init
- Install the bit react-typescript env
bit import -c bit.envs/compilers/react-typescript
- Create a dummy component MyComponent with the following code for example:
import React from 'react';
export default () => <div/>;
- Track the component:
bit add src/MyComponent
- Build:
bit build my-component
Used this tutorial : https://medium.com/@vagacoder/how-to-use-react-and-typescript-in-bit-dev-89a1260d2d9f
Expected Behavior
A successful build is expected since the environment is basic and the component minimal.
Screenshots, exceptions and logs
error: bit failed to build my-component with the following exception: Cannot find module '../../components/core/capsule'
Specifications
- Bit version: 14.7.6
- Node version: 12.16.2
- npm / yarn version: 1.22.4
- Platform: macOS 10.14.6
- Compiler / Tester (include version): bit.envs/compilers/[email protected]
The same issue here