Skip to content

Cannot find namespace 'Microsoft'. #9

@MrTimms

Description

@MrTimms

Thanks for your hard work!

I've hit a compilation error and I don't know how to solve it. Can you take a look at this for me?
I'm using Angular 4.0.1, Angular-CLI 1.0.0, and your module @markpieszak/ng-application-insights 1.0.0-rc.1

Please let me know if you need more information.

ERROR in c:/master/node_modules/@markpieszak/ng-application-insights/dist/src/app-insight.service.d.ts (4,23): Cannot find namespace 'Microsoft'.
c:/master/node_modules/@markpieszak/ng-application-insights/dist/src/app-insight.service.d.ts (5,51): Cannot find namespace 'Microsoft'.
c:/master/node_modules/@markpieszak/ng-application-insights/dist/src/app-insight.service.d.ts (37,14): Cannot find namespace 'Microsoft'.
c:/master/node_modules/@markpieszak/ng-application-insights/dist/src/app-insight.service.d.ts (39,13): Cannot find namespace 'Microsoft'.
c:/master/node_modules/@markpieszak/ng-application-insights/dist/src/app-insight.service.d.ts (70,24): Cannot find namespace 'AI'.
c:/master/node_modules/@markpieszak/ng-application-insights/dist/src/app-insight.service.d.ts (1,1): Cannot find type definition file for 'applicationinsights-js'.

Here is the relevant part of my app.module file:

import { ApplicationInsightsModule, AppInsightsService } from '@markpieszak/ng-application-insights';
@NgModule({
  imports: [
    ...
    ApplicationInsightsModule.forRoot({ instrumentationKey: 'My-Key' })
  ],
   ...

  providers: [
     ...
    AppInsightsService,
   ...
  ]

Here is the relevant part of my component:

import { AppInsightsService } from '@markpieszak/ng-application-insights';
...

constructor(
   ...
   private appInsightsService: AppInsightsService) {}

...
doSomething() {
     this.appInsightsService.trackPageView('WelcomePage')
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions