[BUG] Error when initialize ApplicationInsights
Description/Screenshot
Getting this error when trying to initialize ApplicationInsights.
Could not find file .../%22./PropertiesPlugin.js Error: Could not find file .../%22./PropertiesPlugin.js at TsTranspiler.resolveFilePath (.../node_modules/@ts-liveserver/ts-transpiler/dist/TsTranspiler.js:69:15)
Steps to Reproduce
- OS/Browser:
- SDK Version [e.g. 22]: 2.7.0
- How you initialized the SDK:
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
/**
*
*/
export default class PlatformAnalytics {
private appInsights;
/**
* Constructor.
*
*/
constructor() {
const appInsights: ApplicationInsights = new ApplicationInsights({
config: {
instrumentationKey: 'INSTRUMENTATION_KEY'
}
});
this.appInsights = appInsights.loadAppInsights();
}
/**
* @param name
* @param url
*/
public trackPageView(name: string, url: string): void {
this.appInsights.trackPageView({
name: name,
uri: url
});
}
}
Expected behavior
Additional context Add any other context about the problem here.
What is your build environment, this error indicates that you don't have all of the dependencies installed. The AISku (which looks like the component you are importing) correctly defines the properties plugin as a dependency https://github.com/microsoft/ApplicationInsights-JS/blob/master/AISKU/package.json#L73
This Issue will be closed in 30 days. Please remove the "Stale" label or comment to avoid closure with no action.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.