teambit / envs

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

Receiving error: your component has no build task defined! When following Bit for React #171

Open willemruys opened 3 years ago

willemruys commented 3 years ago

Description

When I follow the Bit for React tutorial, I receive the following error when opening the component in bit.dev:

no build task defined error

I've been trying to find a solution, but no success so far unfortunately.

Specifications

Context and additional information

Here's the package.json file I'm using:

{
  "name": "bit-react-tutorial",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^16.8.6",
    "react-dom": "^16.8.6"
  },
  "devDependencies": {
    "react-scripts": "3.0.1"
  },
  "peerDependencies": {
    "react": "^16.8.6",
    "react-dom": "^16.8.6"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "bit": {
    "env": {
      "compiler": "bit.envs/compilers/react@2.0.0"
    },
    "componentsDefaultDirectory": "components/{name}",
    "packageManager": "npm"
  }
}

Also, when navigating to the code tab in bit.dev, I can see that the compiler has been added:

compiler in code