-
Notifications
You must be signed in to change notification settings - Fork 12k
@ngtools/webpack - Error encountered resolving symbol values statically #3674
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
Comments
angular-cli beta-24 Hash: 5e16130df6044b0b8bb7 ERROR in this.symbolResolver.getSymbolByModule is not a function |
Also on ng build -prod --aot
|
Something similar for me after upgrading ERROR in Error encountered resolving symbol values statically. Only initialized variables and constants can be referenced because the value of this variable is needed by the template compiler (position 79:22 in the original .ts file), resolving symbol AUTH_PROVIDERS in C:/Xacte2/XacteUI-D/node_modules/angular2-jwt/angular2-jwt.d.ts, resolving symbol AppModule in C:/Xacte2/XacteUI-D/src/app/app.module.ts, resolving symbol AppModule in C:/Xacte2/XacteUI-D/src/app/app.module.ts |
I have the same issue reported by @martinmasse with angular2-jwt after upgrading. |
With
|
I'm getting this error too. |
same issue |
Had the same issue using After fixing some templateUrl and styleUrls that no longer worked (relative urls have to start with |
my error is:
latest everything... project: |
@born2net your issues seems related to angular/angular#11262 (comment) Check if you have any lambda expressions in your app.module.ts and replace them with export function |
I have the same issue, error encountered resolving static symbol statically, since upgrading from beta.22 / 2.2.3 to beta.24 / 2.4.0 |
@ajantsch You're trying to compile test files. Try to exclude spec files and @Codenator81 if @martinmasse @mgarcs @aaronleeucla please provide a reproduction project we can look at. This is not helpful. Please file a separate issue with a project we can look at. New issues that are solved always contain project that we test against to avoid regressions in the future, so they really really help. Closing this issue; the original issue is a configuration issue on the part of the creator and I gave him a fix. |
the issue is deeper as you can see here:
|
please open bug or reference a diff one. error: |
@hansl spec files should be excluded by my webpack config:
isTest and isProd are set based on the npm command used, in the case mentioned isTest is false and isProd is true. edit:
|
@ajantsch you need to exclude them from the tsconfig as well. We use the tsconfig for analyzing your code statically. |
@hansl I tried this now, have excluded *.spec.ts files in my tsconfig, but the error stays the same. |
@ajantsch did you exclude The error you're seeing is this (from your own log):
The last part (copied here):
Is trying to resolve |
@hansl that was actually true, I forgot to exclude the karma-main.ts. Now I'm down to only one more error:
|
Me too... working with angular-cli is being so painful.. Could not resolve "app/+home/home.module" from "/src/app/app.module.ts". |
My last mentioned error went away (and AoT compilation is now working again for me) after specifying 'mainPath' in my AoTPlugin. |
About my problem (Could not resolve "app/+home/home.module" from "/src/app/app.module.ts"). I changed the routing FROM: TO: export const routes: Routes = [ |
This Angular-cli is completely not ready for working with it... |
I just ran into this problem, installing all the latest dependencies, and trying to run |
agreed... |
See next. I found a solution for me. I hope this helps. |
This is preventing production deploys, isn't it? |
Please make sure you delete your project dependencies of the old angular-cli in your package.json using:
An issue was having the same error as stated above and I found this to be the solution, might be helpful for someone else. |
I fixed this issue by removing all function calls from my static forRoot() functions. I replaced those functions with factory functions declared/referenced by the provider instead. So in @marioleed's cases that didn't work (1-3) you can see that functions were called during configuration, whereas on the others they are objects using the Typescript Class as an Interface. There's probably a good reason for not allowing arbitrary functions to be called at the configuration stage, but I'm too new to Angular to comment on exactly why. |
Any solution ? |
Keep getting this error with ng serve: ERROR in this.symbolResolver.getSymbolByModule is not a function with angular and angular/cli latest version. Since my project relies on primeng ultima template, I'm Trying to keep my project as close as possible to ultima demo project, which compiles correctly whereas mine doesn't. |
Ant solution for this. Im facing this issue. |
Help, I'm getting the same... Nativescript It has been a headache!
In the morning it worked perfect and suddenly stopped working ... |
@Yamilquery same for me I fix it going back to [email protected] |
I managed to make it work after getting the same error: I used this command to update all the packages
|
Thanks for your attention, I updated my version of angular 4.0.2, I executed the command I deleted the folders:
Later.
And
It worked excellent, thank you very much! This is my package.json
|
@Yamilquery we got the same error today. We had angular 4.0.1 libraries with angular/cli 1.0.0-rc.2 in our package.json. angular/cli 1.0.0-rc.2 getting the latest version of angular/compiler-cli according its dependencies. (4.0.2 at this moment). And angular/compiler-cli 4.0.2 has angular/compiler 4.0.2 in peerDependencies, but it was not installed. So, in our case update from angular 4.0.1 to 4.0.2 solved this error. |
I'm still back on angular2, all I had to do was add the |
@SirBrecilos Running the command:
solved it for me. Thanks! |
I'm getting a very similar error:
Where type TabId and OptionsTab: export type TabId = 'unread' | 'readLater' | 'read' | 'favorites' | 'trash';
export class OptionsTabs
{
constructor
(
public title: string
,public classIcon: string
,public setInTab: TabId
){}
}
I have:
|
Hello guys I am so happy you could find a solution your problem. I am trying to find a solution for mine here is the problem
These are my npm debug
My package json "dependencies": { Any Help Please Thank you in Advance |
Thanks @SirBrecilos, I resolved |
Also had the Problem with "ERROR in this.symbolResolver.getSymbolByModule is not a function |
I resolved this problem by remove all no needed classes from module providers |
I'm using Angular application bootstrapped from
This happens when I add
package.json "dependencies": { |
@dtarczynski , fixed for now? I got same issues:
|
@symphony2014 No. I found a workaround by writing own factory for AuthHttp, so I live with this for now. |
Getting the same error. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions.
Repro steps.
Not really repro steps, but the not-changed webpack config used to work with [email protected] and @ngtools/[email protected], since upgrading I get the error described below and I have no idea what to do about it.
The log given by the failure.
The text was updated successfully, but these errors were encountered: