bit
bit copied to clipboard
Cannot tag/build component when importing nested bit components
Describe the bug
I have 3 angular bit components: spinner, n-button, n-user-verification.
When I am using spinner inside n-button components are tagged successfully.
But when I am trying to tag n-user-verification which uses n-button I see the following error:
Appears in the NgModule.imports of NButtonModule, but could not be resolved to an NgModule class..
bit start works as expected though.
Steps to Reproduce
- Create 2 angular v12 components (using
bit create ng-module ...) - Import one component into another.
- Create third angularV12 bit component and import 2 components in it.
Expected Behavior
Components with nested bit components should be tagged after running bit tag
Screenshots, exceptions and logs
Screenshot of the error:

Screenshot of imported components and module:

Custom env that I use:
import * as path from 'path';
import { EnvsMain, EnvsAspect } from '@teambit/envs'
import { AngularV12Aspect, AngularV12Main } from '@teambit/angular-v12'
export class WebEnvExtension {
constructor(private angular: AngularV12Main) {}
static dependencies: any = [EnvsAspect, AngularV12Aspect]
static async provider([envs, angular]: [EnvsMain, AngularV12Main]) {
const compilerOptions = await angular.overrideCompilerOptions({
fullTemplateTypeCheck: false,
strictPropertyInitialization: false
});
const angularOptions = await angular.overrideAngularOptions({
styles: [path.resolve('node_modules/@ntmnt/uikit.styles.core/index.scss')]
});
const WebEnvEnv = angular.compose([compilerOptions, angularOptions])
envs.registerEnv(WebEnvEnv)
return new WebEnvExtension(angular)
}
}
Specifications
- Bit version: 0.0.748
- Workspace type: harmony
- Node version: 14.19.1
- npm / yarn version: 6.14.6
- Platform: osx
for harmony workspace
- custom env based on teambit/angular-v12
Additional context
Interesting that bit start works just fine.