Which of the following components of the service and Model is not visible to consumers

91

New! Save questions or answers and organize your favorite content.
Learn more.

I upgraded all my angular library to angular 9.0.0 using ng update and when I try to build them I got below error.

Error:

Unsupported private class SomeComponent. This class is visible to consumers via SomeModule -> SomeComponent, but is not exported from the top-level library entrypoint.

Anyone solved this error?

Vadim Kotov

7,8648 gold badges47 silver badges61 bronze badges

asked Feb 7, 2020 at 22:27

Which of the following components of the service and Model is not visible to consumers

Aniruddha DasAniruddha Das

18.9k19 gold badges94 silver badges127 bronze badges

This error happens if any component is exported in NgModuleand not included in your public_api.ts, Angular 9 will throw an error now.

This error was not coming in Angular 8 but after upgrading to Angular 9 it started showing.

If you exported any service, module or component, etc in NgModule make sure to include them in public_api.ts or else angular 9 will throw error now.

Fix: add your component to the public_api.ts

export * from './lib/components/some-me/some-me.component';

Which of the following components of the service and Model is not visible to consumers

DJClayworth

25.9k8 gold badges52 silver badges77 bronze badges

answered Feb 7, 2020 at 22:42

Which of the following components of the service and Model is not visible to consumers

Aniruddha DasAniruddha Das

18.9k19 gold badges94 silver badges127 bronze badges

6

I was struggling with the same issue today.

My prerequisites:

  • I work on an Angular 11 library type project;
  • I have added a new directive;
  • I got an error as above when tried to add my directive to module exports.

Fix:

  • I have added file export to index.ts file:

export * from './just/a/relative/path/to/the/directive/{{myDirectiveFile}}';

answered Apr 6, 2021 at 14:40

0

This error happened to me because I used the default keyword to export my component :

@Component({
  selector: 'lib-form',
  templateUrl: './form.component.html',
  styleUrls: ['./form.component.scss'],
})
export default class FormComponent implements OnInit {
    // ...
}

The use of this keyword was suggested by my Linter and allows to write imports as import FormComponent from './form.component'; instead of import { FormComponent } from './form.component';

However this does not seem to work well along public-api.ts. The solution for me was to remove the default keyword and change all imports.

Josef

2,3802 gold badges20 silver badges22 bronze badges

answered Jul 7, 2021 at 8:04

1

I ran into the same issue. I couldn't remove the default keyword, as Storybook required me to have that. I ended up fixing it by changing this:

export * from './lib/components/some-me/some-me.component';

... to this:

export { default as SomeComponent } from './lib/components/some-me/some-me.component';

in the public_api.ts file.

answered Aug 26 at 20:04

Which of the following components of the service and model is not visible to consumer?

Which of the following components of the servuction model is invisible to consumers? an attitude formed by a long-term, overall evaluation of a firm's performance.

Which of the following components of the Servuction model is visible to consumers?

Organization and systems components of the servuction model are visible to consumers.

Which of the following is are the components of Servuction system?

The servuction model is basically used to illustrate factors that influence service experience, including those that are visible and invisible to the consumer[1]. ... The four factors are: servicescape, contact personnel/service providers, other customers and organizations and systems.

What you call an operation of differ ent services and concentrating on providing only one or a few services in order to pursue a specialization positioning strategy?

Divesting an operation of different services and concentrating on providing only one or a few services in order to pursue a specialization position strategy is called: the communication mix.