Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve type entity ɵngcc29.PsButtonModule to symbol #1713

Closed
darkoandreev opened this issue Aug 7, 2020 · 10 comments
Closed

Cannot resolve type entity ɵngcc29.PsButtonModule to symbol #1713

darkoandreev opened this issue Aug 7, 2020 · 10 comments

Comments

@darkoandreev
Copy link

darkoandreev commented Aug 7, 2020

Hello guys,

I have a UI components library and I added secondary entrypoints to every component and in my demo project everything seems to be fine after production build. The problem is, when I try to install it in a separate project and I've got the following error for prod build:
Cannot resolve type entity ɵngcc29.PsButtonModule to symbol

The project and the library both are built using Angular 10.

Do you know why I get this error only for the button module and do you know what is causing it?

Thanks in advance!

@JoostK
Copy link
Member

JoostK commented Aug 27, 2020

This sounds like it could be similar to angular/angular#38238. There's some more details in that ticket.

@eoussama
Copy link

eoussama commented Jan 7, 2021

Anything on this yet?

@JoostK
Copy link
Member

JoostK commented Jan 7, 2021

Can you try setting compilerOptions.preserveSymlinks: true in tsconfig?

{
  "compilerOptions": {
    // ...
    "preserveSymlinks": true,
    // ...
  }
}

@eoussama
Copy link

eoussama commented Jan 7, 2021

Can you try setting compilerOptions.preserveSymlinks: true in tsconfig?

{
  "compilerOptions": {
    // ...
    "preserveSymlinks": true,
    // ...
  }
}

That fixed my error but I was met with yet another runtime exception:

ERROR Error: Uncaught (in promise): Error: inject() must be called from an injection context
Error: inject() must be called from an injection context

@JoostK
Copy link
Member

JoostK commented Jan 7, 2021

@eoussama that indicates to me that you probably have multiple versions of @angular/core bundled. Could you try setting preserveSymlinks also in angular.json as described in https://dev.to/nieds/getting-started-building-component-libraries-with-angular-cli-4ncj?

@eoussama
Copy link

eoussama commented Jan 7, 2021

I followed that article step by step however, when I try to call a component I get some path conflict errors

@alexandis
Copy link

"preserveSymlinks": true,

Didnt' help :(

@alan-agius4
Copy link
Member

This is unlikely caused by ng-packagr. If the problem persists please file a new issue with a minimal reproduction.

@unanimity
Copy link

in my case

`/** @internal */   <-- DELETE
@Component({`

@github-actions
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

This action has been performed automatically by a bot.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

6 participants