Reputation: 2672
I trying to add service to my package.
@Injectable()
export class LocaleService {}
export it in the api file -
export * from './src/locale.service';
and trying to using it in some component in the package -
export class FormComponent {
constructor(private localeService: LocaleService) {}
}
When I publish it I got error -
ERROR: Entry point swagular/components/src/locale.service which is required by swagular/components doesn't exists.
An unhandled exception occurred: Entry point swagular/components/src/locale.service which is required by swagular/components doesn't exists.
source code is here
Upvotes: 2
Views: 2966
Reputation: 2672
My ide was auto added import like this - import { LocaleService } from 'swagular/components/src/locale.service';
and ng-packager lib thinks that it is a module.
change it to import { LocaleService } from '../locale.service';
solve the probelm.
Upvotes: 3