rollup
rollup copied to clipboard
Angular2 + AOT + rollup: Angulartics2Module is not exported by node_modules/angulartics2/dist/index.js
Hi Guys,
we have just changed webpack to rollup in our angular2 + aot website project, and implementing our angular2 modules cases issues on rollup side.
We are using Angulartics2 module, and AOT compile works fine, but rollup cannot manage it. Could you help me decide is it an issue or not and which side?
Error message
'Angulartics2' is not exported by 'node_modules/angulartics2/dist/core/angulartics2.js'. See https://github.com/rollup/roll
up/wiki/Troubleshooting#name-is-not-exported-by-module
tmp/app/app.module.ngfactory.ts (387:57) 'Angulartics2GoogleAnalytics' is not exported by 'node_modules/angulartics2/dist/providers/ga/angulartics2-ga.js'. See http
s://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
tmp/app/app.module.ngfactory.ts (397:45) 'provideForRootGuard' is not exported by 'node_modules/angulartics2/dist/index.js'. See https://github.com/rollup/rollup/wi
ki/Troubleshooting#name-is-not-exported-by-module
tmp/app/app.module.ngfactory.ts (397:89) 'Angulartics2' is not exported by 'node_modules/angulartics2/dist/core/angulartics2.js'. See https://github.com/rollup/roll
up/wiki/Troubleshooting#name-is-not-exported-by-module
tmp/app/app.module.ngfactory.ts (398:41) 'Angulartics2Module' is not exported by 'node_modules/angulartics2/dist/index.js'. See https://github.com/rollup/rollup/wik
i/Troubleshooting#name-is-not-exported-by-module
tmp/app/app.module.ngfactory.ts (422:23) 'ANGULARTICS2_FORROOT_GUARD' is not exported by 'node_modules/angulartics2/dist/index.js'. See https://github.com/rollup/ro
llup/wiki/Troubleshooting#name-is-not-exported-by-module
tmp/app/app.module.ngfactory.ts (425:23) 'Angulartics2Module' is not exported by 'node_modules/angulartics2/dist/index.js'. See https://github.com/rollup/rollup/wik
i/Troubleshooting#name-is-not-exported-by-module
tmp/app/app.module.ngfactory.ts (533:23) 'Angulartics2' is not exported by 'node_modules/angulartics2/dist/core/angulartics2.js'. See https://github.com/rollup/roll
up/wiki/Troubleshooting#name-is-not-exported-by-module
tmp/app/app.module.ngfactory.ts (536:23) 'Angulartics2GoogleAnalytics' is not exported by 'node_modules/angulartics2/dist/providers/ga/angulartics2-ga.js'. See http
s://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
'Angulartics2Module' is not exported by node_modules/angulartics2/dist/index.js (imported by tmp/app/app.module.ts). For help fixing this error see https://github.c
om/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
Angulartics2 installed.
Angulartics2 used in our app.module.ts and app.component.ts.
app.module.ts
import { Angulartics2GoogleAnalytics, Angulartics2Module } from 'angulartics2';
@NgModule({
imports: [
Angulartics2Module.forRoot([ Angulartics2GoogleAnalytics ])
app.component.ts
import { Angulartics2GoogleAnalytics } from 'angulartics2';
@Component({
selector: 'pm-app',
template: `<router-outlet></router-outlet>
<pm-footer></pm-footer>`
})
export class AppComponent {
constructor(
angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics
){}
};
Print screen

Could you help me how to solve it?