Unable to add a Private npm module as dependency in angular2 app

66 Views Asked by At

I have set up a Pvt sinopia server in which I have published my apps (node Modules). Now, I have created a new local Angular2 Project in which I have installed these apps (modules) as dependencies. When I am trying to use these modules (by adding it as import in app.module.ts) I have added following to app.module.ts of my App

import { FlashAppModule } from '@netapp/flash-advisor-ui';

@NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, FormsModule, HttpModule, FlashAppModule ],

I get the following error.

The error is asking to convert @angular/ lambda functions to export function.

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/codeTest/node_modules/@netapp/flash -advisor-ui/node_modules/@angular/core/core.d.ts, resolving symbol FlashAppModule in C:/sinopia/codeTest/node_modules/@netapp/flash-advisor-ui/src/app/ap p.module.ts, resolving symbol FlashAppModule in C:/sinopia/codeTest/node_modules/@netapp/flash-advisor-ui/src/app/app.module.ts at positionalError (C:\sinopia\codeTest\node_modules\@angular\compiler\bundles\compiler.umd.js:25935:39) at simplifyInContext (C:\sinopia\codeTest\node_modules\@angular\compiler\bundles\compiler.umd.js:25772:31) at StaticReflector.simplify (C:\sinopia\codeTest\node_modules\@angular\compiler\bundles\compiler.umd.js:25786:17) at StaticReflector.annotations (C:\sinopia\codeTest\node_modules\@angular\compiler\bundles\compiler.umd.js:25282:64) at _getNgModuleMetadata (C:\sinopia\codeTest\node_modules\@angular\compiler-cli\src\ngtools_impl.js:126:31) at _extractLazyRoutesFromStaticModule (C:\sinopia\codeTest\node_modules\@angular\compiler-cli\src\ngtools_impl.js:101:26) at C:\sinopia\codeTest\node_modules\@angular\compiler-cli\src\ngtools_impl.js:117:27 at Array.reduce (native) at _extractLazyRoutesFromStaticModule (C:\sinopia\codeTest\node_modules\@angular\compiler-cli\src\ngtools_impl.js:116:10) at Object.listLazyRoutesOfModule (C:\sinopia\codeTest\node_modules\@angular\compiler-cli\src\ngtools_impl.js:52:22) at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\sinopia\codeTest\node_modules\@angular\compiler-cli\src\ngtools_api.js:78:39) at AotPlugin._getLazyRoutesFromNgtools (C:\sinopia\codeTest\node_modules\@ngtools\webpack\src\plugin.js:207:44) at _donePromise.Promise.resolve.then.then.then.then.then (C:\sinopia\codeTest\node_modules\@ngtools\webpack\src\plugin.js:443:24) at process._tickCallback (internal/process/next_tick.js:103:7) webpack: Failed to compile.

0

There are 0 best solutions below