Getting error: Identifier t has already been declared - Angular v13

Discussão em 'Angular' iniciado por user1749518, Junho 9, 2025.

  1. user1749518

    user1749518 Guest

    My application is Angular which is launched from QT/QML Webview

    I am integrating Amplitude Analytics library in my Angular v13 project. I am using below libraries of Amplitude "@amplitude/analytics-browser": "2.16.0", "@amplitude/plugin-session-replay-browser": "^1.16.0",

    My project angular version is below "@angular/animations": "~13.3.0", "@angular/cdk": "^13.3.9", "@angular/common": "~13.3.0", "@angular/compiler": "~13.3.0", "@angular/core": "~13.3.0", "@angular/forms": "~13.3.0", "@angular/platform-browser": "~13.3.0", "@angular/platform-browser-dynamic": "~13.3.0", "@angular/router": "~13.3.0", Node version is v16.20.2

    When I run npm run build my build is successful. But when I bundle it with QT/QML application and run QT build QT Creator v13.0.2 I get error: Identifier t has already been declared in Error compiling js file: resources\demo\main.f6ec7f74c373c188.js:1:1075898: error: error: Identifier t has already been declared

    Below is my tsconfig.json { "compileOnSave": false, "compilerOptions": { "baseUrl": "./", "downlevelIteration": true, "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, "emitDecoratorMetadata": false, "module": "esnext", "moduleResolution": "node", "experimentalDecorators": true, "resolveJsonModule": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "importHelpers": true, "target": "es2015", "typeRoots": ["node_modules/@types"], "types": ["RxJS"], "lib": ["es2017", "dom"], } }


    1. If I remove "@amplitude/plugin-session-replay-browser": "^1.16.0" package, the build is succeful but with this I will not get session replay. So need help on this so I can get session replay as well


    2. I also added "@amplitude/plugin-session-replay-browser" and "@amplitude/analytics-browser" in allowedCommonJsDependencies in angular.json


    3. I also updated @types/nodes in my package.json. Current version - "@types/node": "^12.11.1" After trying all the above I was not succesful so need help on fixing this

    Continue reading...

Compartilhe esta Página