Ionic 2 Adding Third Party Libs Error

I am adding third party libs
google map infowindows [ https://github.com/atmist/snazzy-info-window/blob/master/examples/scss-styles/scripts.js ]
follow by [ https://ionicframework.com/docs/resources/third-party-libs/ ]
is error .

My Code Use

File station.ts me is code import header

import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams, LoadingController } from 'ionic-angular';
import { Geolocation } from '@ionic-native/geolocation';
import snazzyinfo from 'snazzy-info-window';

Runtime

 Error
Uncaught (in promise): TypeError: __WEBPACK_IMPORTED_MODULE_3_snazzy_info_window___default.a.SnazzyInfoWindow is not a constructor 
TypeError: __WEBPACK_IMPORTED_MODULE_3_snazzy_info_window___default.a.SnazzyInfoWindow is not a 
constructor at Station.ngAfterViewInit (http://localhost:8100/build/main.js:60289:20) at callProviderLifecycles 
(http://localhost:8100/build/main.js:11456:18) at callElementProvidersLifecycles 
(http://localhost:8100/build/main.js:11431:13) at callLifecycleHooksChildrenFirst 
(http://localhost:8100/build/main.js:11415:17) at checkAndUpdateView (http://localhost:8100/build/main.js:12433:5) at 
callWithDebugContext (http://localhost:8100/build/main.js:13413:42) at Object.debugCheckAndUpdateView [as 
checkAndUpdateView] (http://localhost:8100/build/main.js:12953:12) at ViewRef_.detectChanges 
(http://localhost:8100/build/main.js:10523:63) at Tab.NavControllerBase._viewAttachToDOM 
(http://localhost:8100/build/main.js:44366:40) at Tab._viewAttachToDOM (http://localhost:8100/build/main.js:75725:43) at 
Tab.NavControllerBase._transitionInit (http://localhost:8100/build/main.js:44469:18) at 
Tab.NavControllerBase._postViewInit (http://localhost:8100/build/main.js:44321:14) at Tab.NavControllerBase._viewTest 
(http://localhost:8100/build/main.js:44418:25) at Tab.NavControllerBase._nextTrns 
(http://localhost:8100/build/main.js:44160:25) at Tab.NavControllerBase._queueTrns 
(http://localhost:8100/build/main.js:44110:14)

Ionic Framework: 3.0.1
Ionic App Scripts: 1.3.0
Angular Core: 4.0.0
Angular Compiler CLI: 4.0.0
Node: 6.10.2
OS Platform: macOS Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36

Thx.

Please help me. :joy: :joy: :joy: :joy: :joy: :joy: :joy:

Great error!

I think you should change line 5 of your code to say “I should post the code I wrote so that the nice people in the Ionic forums can actually understand what I am doing and what causes the error”. This will probably help…

2 Likes