Description
Hello, I'm encountering an issue when using PostHog JS with Angular 12. The goal is to integrate it into an existing project. Here are my dependencies:
"dependencies": { "@angular-material-extensions/select-country": "^5.1.0", "@angular/animations": "~12.2.17", "@angular/cdk": "^12.2.13", "@angular/common": "~12.2.17", "@angular/compiler": "~12.2.0", "@angular/core": "~12.2.17", "@angular/forms": "~12.2.0", "@angular/material": "^12.2.13", "@angular/material-moment-adapter": "^14.1.2", "@angular/platform-browser": "~12.2.0", "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@asymmetrik/ngx-leaflet": "^8.1.0", "@swimlane/ngx-graph": "^7.2.0", "angular-plotly.js": "^4.0.4", "bootstrap": "^4.5.3", "chroma.ts": "^1.0.10", "d3-shape": "^3.2.0", "file-saver": "^2.0.5", "handsontable": "^12.3.3", "leaflet": "^1.7.1", "leaflet-marker-rotation": "^0.4.0", "mat-table-filter": "^10.2.0", "moment": "^2.30.1", "ng2-handsontable": "^2.1.0-rc.3", "ngx-bootstrap": "^7.1.0", "pikaday": "^1.8.2", "plotly.js-basic-dist": "^2.11.1", "plotly.js-dist-min": "^2.11.1", "posthog-js": "^1.207.3", "rxjs": "~6.6.0", "rxjs-compat": "^6.6.7", "tslib": "^2.3.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "^12.2.18", "@angular/cli": "~12.2.10", "@angular/compiler-cli": "~12.2.0", "@types/d3-shape": "^3.1.7", "@types/jasmine": "~3.8.0", "@types/karma-chrome-launcher": "^3.1.4", "@types/karma-coverage": "^2.0.3", "@types/karma-jasmine": "^4.0.5", "@types/karma-jasmine-html-reporter": "^1.7.3", "@types/leaflet": "1.5.19", "@types/moment": "^2.13.0", "@types/node": "^12.20.55", "@types/plotly.js-dist-min": "^2.3.0", "jasmine-core": "~3.8.0", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.0.3", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "~1.7.0", "typescript": "~4.3.5" }
And TsConfig file :
/** To learn more about this file see: https://angular.io/config/tsconfig. */ { "compileOnSave": false, "compilerOptions": { "skipLibCheck": true, "baseUrl": "./", "outDir": "./dist/out-tsc", "forceConsistentCasingInFileNames": true, "strict": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "sourceMap": true, "declaration": false, "downlevelIteration": true, "experimentalDecorators": true, "moduleResolution": "node", "importHelpers": true, "target": "es2017", "module": "es2020", "strictPropertyInitialization": false, "lib": [ "es2018", "dom" ], "noImplicitAny": false, }, "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, "strictInjectionParameters": true, "strictInputAccessModifiers": true, "strictTemplates": true, "noImplicitReturns": false, "strictNullChecks": false, "allowSyntheticDefaultImports": true, } }
Here's an sample of the error :
Thanks for you help !