简体   繁体   中英

Unable to run Angular4 application

I have set up a Sinopia server in which I have published my private modules, I am importing these modules in a common UI framework and trying to run it.

Following is my app.module.ts code where I am importing the modules

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { AppRouting } from './app.routing';
import { AppComponent } from './app.component';
import { FlashAppModule } from '@netapp/flash-advisor-ui';
import { UIComponentModule } from '../ui/ui.component.module'
import { PerformanceAppModule } from '@netapp/performance-dashboard';

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        FlashAppModule,
        PerformanceAppModule,
        FormsModule,
        HttpModule,
        AppRouting,
        UIComponentModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }

when I am starting the application npm start I get the following error. I have not written a single line of code using lambda func. I have just imported these modules that's it.

ERROR in Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 194:50 in the original .ts file), resolving symbol NgModule in C:/sinopia/tes t/gtest/node_modules/@netapp/flash-advisor-ui/node_modules/@angular/core/core.d.ts, resolving symbol FlashAppModule in C:/sinopia/test/gt est/node_modules/@netapp/flash-advisor-ui/src/app/app.module.ts, resolving symbol FlashAppModule in C:/sinopia/test/gtest/node_modules/@n etapp/flash-advisor-ui/src/app/app.module.ts at positionalError (C:\\sinopia\\test\\gtest\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:23957:35) at simplifyInContext (C:\\sinopia\\test\\gtest\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:23800:27) at StaticReflector.simplify (C:\\sinopia\\test\\gtest\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:23814:13) at StaticReflector.annotations (C:\\sinopia\\test\\gtest\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:23263:41) at _getNgModuleMetadata (C:\\sinopia\\test\\gtest\\node_modul es\\@angular\\compiler-cli\\src\\ngtools_impl.js:126:31) at _extractLazyRoutesFromStaticModule (C:\\sinopia\\test\\gtest\\node_modules\\@angular\\compiler-cli\\src\\ngtools_impl.js:101:26) at C:\\sinopia\\test\\gtest\\node_modules\\@angular\\compiler-cli\\src\\ngtools_impl.js:117:27 at Array.reduce (native) at _extractLazyRoutesFromStaticModule (C:\\sinopia\\test\\gtest\\node_modules\\@angular\\compiler-cli\\src\\ngtools_impl.js:116:10) at Object.listLazyRoutesOfModule (C:\\sinopia\\test\\gtest\\node_modules\\@angular\\compiler-cli\\src\\ngtools_impl.js:52:22) at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\\sinopia\\test\\gtest\\node_modules\\@angular\\compiler-cli\\src\\ngtools_api.js:79:3 9) at AotPlugin._getLazyRoutesFromNgtools (C:\\sinopia\\test\\gtest\\node_modules\\@ngtools\\webpack\\src\\plugin.js:207:44) at _donePromise.Promise.resolve.then.then.then.then.then (C:\\sinopia\\test\\gtest\\node_modules\\@ngtools\\webpack\\src\\plugin.js:443:24) at process._tickCallback (internal/process/next_tick.js:103:7) webpack: Failed to comp ile.

From the error I can see that you're using AOT. Yes, AOT doesn't support arrow functions as it said in the error text. And yes, please post error text right in the question body. PS Nothing new I can say - please check again that your code valid for AOT compilation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM