You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using amplitude with Angular up to V11 with no problems. After upgrading to Angular 15.2.9 and trying to compile the project I get the following error:
./libs/***/analytics.service.ts:6:22-43 - Error: export 'getInstance' (imported as 'amplitude') was not found in 'amplitude-js' (possible exports: default)
./libs/***/analytics.service.ts:40:25-43 - Error: export 'Identify' (imported as 'amplitude') was not found in 'amplitude-js' (possible exports: default)
The analytics.service.ts looks like this:
import { Injectable } from '@angular/core';
import * as amplitude from 'amplitude-js';
@Injectable()
export class AnalyticsService {
private amInstance = amplitude.getInstance();
[...]
Summary
I have been using amplitude with Angular up to V11 with no problems. After upgrading to Angular 15.2.9 and trying to compile the project I get the following error:
The analytics.service.ts looks like this:
Here is an excerpt from my package.json
Thanks for any tips!
The text was updated successfully, but these errors were encountered: