error: the component styles does not contain a main file.
I just tried to update my ts compiler and now I'm getting this error, when trying to build a component:
error: bit failed to build firstname.lastname@example.org with the following exception: Cannot read property 'split' of undefined TypeError: Cannot read property 'split' of undefined at getNameOfFile (/Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:301:56) at /Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:213:48 at step (/Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:33:23) at Object.next (/Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:14:53) at /Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:8:71 at new Promise (<anonymous>) at __awaiter (/Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:4:12) at createConfigFile (/Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:209:12) at /Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:104:23 at step (/Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:33:23) at Object.next (/Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:14:53) at /Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:8:71 at new Promise (<anonymous>) at __awaiter (/Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:4:12) at preCompile (/Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:100:12) at Object.<anonymous> (/Users/deylak/Desktop/ForLovelyMe/Repository/pik-pro-master-app/.git/bit/components/compilers/typescript/bit.envs/3.1.38/dist/ts-compiler/src/compile.js:73:32)
I used version
3.1.0 previously and it worked fine. Now I'm trying to update to email@example.com and all compiler versions with that release of typescript are throwing this error.
My project structure:
├── package.json ├── src │ ├── components │ │ ├── SignIn │ │ │ └── index.tsx │ │ └── SignUp │ │ └── index.tsx │ └── utils │ ├── auth │ │ ├── jwt │ │ │ └── index.ts │ │ └── server │ │ └── index.ts │ ├── logging │ │ └── index.ts │ └── styles │ └── README.md
├── dist │ ├── README.md │ ├── index.d.ts │ ├── index.js │ ├── index.md │ ├── jwt │ │ ├── index.d.ts │ │ └── index.js │ └── server │ ├── index.d.ts │ └── index.js
$ bit import bit.envs/testers/jest failed running npm install at /Users/ran/Projects/ui-platform-utils/envs/components/testers/jest npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@bit%2fbit.utils.validation.empty - Not found npm ERR! 404 npm ERR! 404 '@firstname.lastname@example.org' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 It was specified as a dependency of 'jest' npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url. npm ERR! A complete log of this run can be found in: npm ERR! /Users/ran/.npm/_logs/2020-02-06T10_50_53_789Z-debug.log see troubleshooting at https://docs.bit.dev/docs/installing-components run 'bit doctor' to get detailed workspace diagnosis and issue resolution.
Looks like to use Bit, I need to buy into it's module specifier conventions. Can this be avoided? Suppose each project (which is a submodule in my umbrella repo) contains web components, and I want to share them across projects (some projects are apps, some are libs).
Does bit make it easy to use only Node.js-style import specifiers and store everything on NPMjs.com?
Ah, I see, Bit calls them "workspaces". So then, in my case, I am looking to have an "umbrella repo" with a bunch of Bit "workspaces" as git submodules. Would this work?
Basically, I'd like a big "umbrella repo" to house all my related apps and libs as git submodules.
bit initin each workspace (git submodule). Now I'm wondering if this can be done automatically across all "workspaces".
hi @trusktr , we've moved to a slack community and left gitter a few weeks ago.
As for your questions, BIt is designed to handle smaller components, and not for projects.
Usually, teams use lerna/rush to manage a small number of large projects in the same repository. On the other hand, Bit is designed to manage many small "projects" (modules/components) in the same workspace. technically it's possible to manage larger projects, but it is not optimized for it. Bit is optimized for projects with a relatively small amount of code and a lot of dependencies.
it's possible to group together several Bit workspaces, each with its own set of components, in the same "master" workspace.
as for sharing components to npmjs, it's possible, but you'll need to implement an extension to do just that. it's also possible to change the default
@bit, but this is not supported when hosting code on bit.dev .
@itaymendel_twitter Cool! Thanks for that info. Seems that Bit can be paired with Lerna/Rush. F.e. I can use Lerna to run test commands across multiple repos, and the test commands can trigger Bit commands in each of the projects.
What about symlinking dependencies for development? Suppose I want to edit code for a component and see the changes in multiple projects at once? Normally Lerna cross links dependencies, or we can manually link local projects into dependents the old
npm link way, and test changes across them all at once. Does bit have such feature for developing a component and testing it across across multiple projects at once?