-
Notifications
You must be signed in to change notification settings - Fork 6
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
Error encountered resolving symbol values statically #7
Comments
It seems angular team changed something in the I'm at work currently. Can you try to export the config and then use it? config.ts import { TranslateConfig } from 'angular2-translator/angular2-translator'
export const MyTranslateConfig = new TranslateConfig({...}); app.module.ts import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { AppComponent } from './app.component';
// import { LanguageComponent } from './language.components';
import { TranslatorModule, TranslateConfig, TranslateService, TranslatePipe } from 'angular2-translator/angular2-translator';
import { MyTranslateConfig } from 'config';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
TranslatorModule
],
providers: [
{ provide: TranslateConfig, useValue: MyTranslateConfig },
TranslatePipe,
TranslateService
],
bootstrap: [AppComponent]
})
export class AppModule { } WARNING: this is written in the editor and never compiled. Maybe I dont remember the syntax correctly. Please check the syntax 😄 |
may be this file has to be changed as well: I can do this in the evening. |
I removed alle providers from ERROR in Error encountered resolving symbol values statically. Calling function 'TranslateConfig', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol TranslatorModule in /Users/robert/repository/nextlevel17/nl2017-client/node_modules/angular2-translator/angular2-translator.ts, resolving symbol TranslatorModule in /Users/robert/repository/nextlevel17/nl2017-client/node_modules/angular2-translator/angular2-translator.ts Maybe it would help to replace I'm not familiar with npm packages. I tried to change the source code in node_modules for testing purpose. But I'm getting this error:
|
As I thought - this libray has the same way (create a new object inside |
Sorry, I can't reproduce it. I see you used angular-cli. So you also copied the code to your source folder right? Maybe you can try download the source from this branch and try it with the code from there - may be it works. But anyway: I don't support angular-cli - especially because it is still beta |
yes, I did. I see. This must be an issue with angular-cli. |
If this fix helps I can publish 1.3.1 from it - if not it would be nice if you find a solution and post it here. Thanks in advance! |
I have this strage error message, when I run
npm start
Note: When I change a source file, then webpack will be recompiled successfully.
any ideas?
node : v7.5.0
npm: 4.2.0
os: mac os 10.12.3
Full log
package.json
app.module.ts
The text was updated successfully, but these errors were encountered: