Skip to content

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

Open

Description

@willemruys

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

  • Bit version: 14.8.8
  • Node version: v15.5.0
  • npm / yarn version: npm
  • Platform: React
  • Compiler / Tester (include version): bit.envs/compilers/react@2.0.0

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions