2017-10-12 143 views
-1

我已經建立了一個Sinopia服務器,我在其中發佈了我的私有模塊,我將這些模塊導入到一個通用的UI框架中並嘗試運行它。無法運行Angular4應用程序

以下是我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 { 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 { } 

當我開始應用npm start我碰到下面的錯誤。 我沒有用lambda func編寫一行代碼。我剛剛導入了這些模塊。

ERROR in Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function o r 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_modules\@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 compile.

+0

看起來像你有函數調用某處在你的代碼中的函數(){} ....發佈你的代碼,否則我們將無法幫助! – JayDeeEss

+0

回答沒有源代碼的問題真的很難,只是一個鏈接到錯誤消息的圖像。爲了獲得高質量的答案,你真的需要提出非常詳細的問題 - 你在做什麼,你遇到什麼問題,你嘗試過什麼。查看其他發佈的問題,以瞭解應該包括的詳細程度,以便獲得更好的答案。 –

回答

0

從錯誤我可以看到你使用AOT。是的,AOT不支持錯誤文本中所述的箭頭功能。是的,請在問題主體中發佈錯誤文本。 P.S.沒有新的我可以說 - 請再次檢查您的代碼是否適用於AOT編譯。

+0

對不起,我添加了代碼。請檢查 – arjun