I have a situation with an angular 2 component. When I place it in
app-name/src/app/component-folder/component.ts
and import it as import {Component} from './component-folder/component'
, everything works perfectly fine.
However, if I install the component into the app-name/node_modules
folder at
app-name/node_modules/component-folder/component
and then try to do
import {Component} from 'component-folder/component'
or
import {Component} from '../../node_modules/component-folder/component'
I get this error:
Unexpected value 'Component' declared by the module 'AppModule'
Can someone explain why this happens and how can I resolve this issue?