I am trying to make a test component on bit dev, but I fail. After succesfully:
- creating an app - CRA
- initializing bit
- installing compiler
- adding / building / exporting component
I get a warning when I go to bit dev page of a component (which is exported properly, but preview is not loading):
Note: your component has no build task defined!
To consume components using NPM or Yarn you should define a build environment for your components. Learn more.
And therefore I can't then install this component in other project. Package.json looks like this:
{
"name": "new-one",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"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"
}
}
I search and search, but no one seems to have such a problem. Any idea?
Error during installation in another project:
npm ERR! code ENOVERSIONS
npm ERR! No valid versions available for @bit/maciejwira.main.test
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Maciej\AppData\Roaming\npm-cache\_logs\2021-05-15T14_38_51_258Z-debug.log
