envs icon indicating copy to clipboard operation
envs copied to clipboard

react-typescript: Cannot find module '../../components/core/capsule'

Open romrg opened this issue 4 years ago • 1 comments

Describe the bug

Unable to compile a component with react-typescript env.

Steps to Reproduce

  1. Create an app with create-react-app with Typescript

npx create-react-app my-app --template typescript

  1. Put react and react-dom as peer dependencies
  2. bit init
  3. Install the bit react-typescript env

bit import -c bit.envs/compilers/react-typescript

  1. Create a dummy component MyComponent with the following code for example:
import React from 'react';

export default () => <div/>;
  1. Track the component: bit add src/MyComponent
  2. 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]

romrg avatar Apr 20 '20 07:04 romrg

The same issue here

YacheLee avatar Aug 14 '21 13:08 YacheLee