Skip to content

Duplicate Identifier when building #436

Closed

Description

@msegers

[x ] bug report
[ ] feature request
[ ] question about the decisions made in the repository

Hi after updating, I keep getting these kind of duplicates in my logs. I've tried to find out if I might be building something double or such. But I can't find anything, before pulling everything was fine (I used to be on angular.8 beta now it's the 10 version, I saw this at 9 too so I reverted.

[default] /Users/mathijs/projects/customer-care/typings/browser/ambient/selenium-webdriver/index.d.ts (2149,9):
Duplicate identifier 'LEFT'.
[default] /Users/mathijs/projects/customer-care/typings/browser/ambient/selenium-webdriver/index.d.ts (2150,9):
Duplicate identifier 'ARROW_UP'.
[default] /Users/mathijs/projects/customer-care/typings/browser/ambient/selenium-webdriver/index.d.ts (2151,9):
Duplicate identifier 'UP'.
[default] /Users/mathijs/projects/customer-care/typings/browser/ambient/selenium-webdriver/index.d.ts (2152,9):
Duplicate identifier 'ARROW_RIGHT'.
[default] /Users/mathijs/projects/customer-care/typings/browser/ambient/selenium-webdriver/index.d.ts (2153,9):
Duplicate identifier 'RIGHT'.
[default] /Users/mathijs/projects/customer-care/typings/browser/ambient/selenium-webdriver/index.d.ts (2154,9):
Duplicate identifier 'ARROW_DOWN'.
[default] /Users/mathijs/projects/customer-care/typings/browser/ambient/selenium-webdriver/index.d.ts (2155,9):
Duplicate identifier 'DOWN'.
[default] /Users/mathijs/projects/customer-care/typings/browser/ambient/selenium-webdriver/index.d.ts (2156,9):
Duplicate identifier 'INSERT'.
[default] /Users/mathijs/projects/customer-care/typings/browser/ambient/selenium-webdriver/index.d.ts (2157,9):
Duplicate identifier 'DELETE'.
[default] /Users/mathijs/projects/customer-care/typings/browser/ambient/selenium-webdriver/index.d.ts (2158,9):
Duplicate identifier 'SEMICOLON'.
[default] /Users/mathijs/projects/customer-care/typings/browser/ambient/selenium-webdriver/index.d.ts (2159,9):

  • What is the current behavior?
    It works just fine in dev, but prod can't be build and the logs are stuffed with above error.
  • Please tell us about your environment:
    Latest Master properties building from a macbook pro with mostly everything updated to recent.

Activity

  1. whtouche commented on Mar 19, 2016

    @whtouche

    Confirming issue - I cloned and installed a copy of this project yesterday and got the same errors (though different typings files were colliding for me, attaching screenshots)

    screen shot 2016-03-19 at 4 23 01 pm

    screen shot 2016-03-19 at 4 23 28 pm

    Nothing worked until I reverted to angular 2 beta.8 but now have no apparent errors.

  2. alvipeo commented on Mar 19, 2016

    @alvipeo

    Just remove typings folder and do 'npm install'.

  3. kennethlynne commented on Mar 19, 2016

    @kennethlynne

    @alvipeo I removed the typings folder and ran npm install with no success.

    [default] Checking started in a separate process...
    [default] /node_modules/angular2/src/common/directives/ng_plural.d.ts (2,10):
        Module '"/node_modules/angular2/src/common/directives/ng_switch"' has no exported member 'SwitchView'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (127,5):
        Duplicate identifier 'parent'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (131,5):
        Duplicate identifier 'name'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (219,5):
        Duplicate identifier 'current'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (223,5):
        Duplicate identifier 'currentTask'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (234,5):
        Duplicate identifier 'name'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (238,5):
        Duplicate identifier 'properties'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (251,5):
        Duplicate identifier 'onFork'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (261,5):
        Duplicate identifier 'onIntercept'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (273,5):
        Duplicate identifier 'onInvoke'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (282,5):
        Duplicate identifier 'onHandleError'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (291,5):
        Duplicate identifier 'onScheduleTask'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (292,5):
        Duplicate identifier 'onInvokeTask'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (301,5):
        Duplicate identifier 'onCancelTask'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (310,5):
        Duplicate identifier 'onHasTask'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (344,5):
        Duplicate identifier 'zone'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (354,14):
        Duplicate identifier 'HasTaskState'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (363,14):
        Duplicate identifier 'TaskType'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (370,5):
        Duplicate identifier 'isPeriodic'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (374,5):
        Duplicate identifier 'delay'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (397,5):
        Duplicate identifier 'type'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (401,5):
        Duplicate identifier 'source'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (406,5):
        Duplicate identifier 'invoke'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (411,5):
        Duplicate identifier 'callback'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (415,5):
        Duplicate identifier 'data'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (421,5):
        Duplicate identifier 'scheduleFn'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (428,5):
        Duplicate identifier 'cancelFn'.
    [default] /node_modules/zone.js/dist/zone.js.d.ts (433,5):
        Duplicate identifier 'zone'.
    [default] /src/polyfills.ts (11,8):
        Exported external package typings file '/node_modules/zone.js/dist/zone.js.d.ts' is not a module. Please contact the package author to update the package definition.
    [default] /typings/browser/ambient/zone.js/index.d.ts (129,5):
        Duplicate identifier 'parent'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (133,5):
        Duplicate identifier 'name'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (221,5):
        Duplicate identifier 'current'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (225,5):
        Duplicate identifier 'currentTask'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (236,5):
        Duplicate identifier 'name'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (240,5):
        Duplicate identifier 'properties'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (253,5):
        Duplicate identifier 'onFork'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (263,5):
        Duplicate identifier 'onIntercept'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (275,5):
        Duplicate identifier 'onInvoke'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (284,5):
        Duplicate identifier 'onHandleError'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (293,5):
        Duplicate identifier 'onScheduleTask'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (294,5):
        Duplicate identifier 'onInvokeTask'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (303,5):
        Duplicate identifier 'onCancelTask'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (312,5):
        Duplicate identifier 'onHasTask'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (346,5):
        Duplicate identifier 'zone'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (356,14):
        Duplicate identifier 'HasTaskState'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (365,14):
        Duplicate identifier 'TaskType'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (372,5):
        Duplicate identifier 'isPeriodic'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (376,5):
        Duplicate identifier 'delay'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (399,5):
        Duplicate identifier 'type'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (403,5):
        Duplicate identifier 'source'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (408,5):
        Duplicate identifier 'invoke'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (413,5):
        Duplicate identifier 'callback'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (417,5):
        Duplicate identifier 'data'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (423,5):
        Duplicate identifier 'scheduleFn'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (430,5):
        Duplicate identifier 'cancelFn'.
    [default] /typings/browser/ambient/zone.js/index.d.ts (435,5):
        Duplicate identifier 'zone'.
  4. alvipeo commented on Mar 20, 2016

    @alvipeo

    Here's my package.js (beta 11) which works (with moment.js and crypto-js as an extra, you can remove them):

    {
      "name": "angular2-webpack-starter",
      "version": "3.0.0",
      "description": "An Angular 2 Webpack Starter kit featuring Angular 2 (Router, Http, Forms, Services, Tests, E2E, Coverage), Karma, Protractor, Jasmine, Istanbul, TypeScript, and Webpack by AngularClass",
      "author": "Patrick Stapleton <patrick@angularclass.com>",
      "homepage": "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/angularclass/angular2-webpack-starter",
      "license": "MIT",
      "scripts": {
        "clean": "npm cache clean && rimraf node_modules doc typings coverage dist",
        "clean:dist": "rimraf dist",
        "preclean:install": "npm run clean",
        "clean:install": "npm set progress=false && npm install",
        "preclean:start": "npm run clean",
        "clean:start": "npm start",
        "watch": "npm run watch:dev",
        "watch:dev": "webpack --watch --progress --profile --colors --display-error-details --display-cached",
        "watch:dev:hmr": "npm run watch:dev -- --hot",
        "watch:test": "npm run test -- --auto-watch --no-single-run",
        "watch:prod": "webpack --watch --config webpack.prod.config.js --progress --profile --colors --display-error-details --display-cached",
        "build": "npm run build:dev",
        "prebuild:dev": "npm run clean:dist",
        "build:dev": "webpack --progress --profile --colors --display-error-details --display-cached",
        "prebuild:prod": "npm run clean:dist",
        "build:prod": "webpack --config webpack.prod.config.js --progress --profile --colors --display-error-details --display-cached --bail",
        "server": "npm run server:dev:hmr",
        "server:dev": "webpack-dev-server --inline --progress --profile --colors --watch --display-error-details --display-cached --content-base src/",
        "server:dev:hmr": "npm run server:dev -- --hot",
        "server:prod": "http-server dist --cors",
        "webdriver:update": "webdriver-manager update",
        "webdriver:start": "webdriver-manager start",
        "lint": "./node_modules/.bin/tslint 'src/**/*.ts'",
        "pree2e": "npm run webdriver:update -- --standalone",
        "e2e": "protractor",
        "e2e:live": "protractor --elementExplorer",
        "test": "karma start",
        "ci": "npm run e2e && npm run test",
        "docs": "typedoc --options typedoc.json --exclude '**/*.spec.ts' ./src/",
        "start": "npm run server",
        "typings-install": "typings install",
        "postinstall": "npm run typings-install",
        "preversion": "npm test",
        "version": "npm run build",
        "postversion": "git push && git push --tags"
      },
      "dependencies": {
        "angular2": "2.0.0-beta.11",
        "core-js": "^2.2.1",
        "moment": "^2.12.0",
        "rxjs": "5.0.0-beta.2",
        "zone.js": "0.6.4"
      },
      "devDependencies": {
        "awesome-typescript-loader": "^0.16.2",
        "compression-webpack-plugin": "^0.3.0",
        "copy-webpack-plugin": "^1.1.1",
        "crypto-js": "^3.1.6",
        "css-loader": "^0.23.1",
        "es6-promise": "^3.1.2",
        "es6-promise-loader": "^1.0.1",
        "es6-shim": "^0.33.3",
        "es7-reflect-metadata": "^1.6.0",
        "exports-loader": "^0.6.3",
        "expose-loader": "^0.7.1",
        "file-loader": "^0.8.5",
        "html-webpack-plugin": "^2.10.0",
        "http-server": "^0.9.0",
        "ie-shim": "^0.1.0",
        "imports-loader": "^0.6.5",
        "istanbul-instrumenter-loader": "^0.2.0",
        "json-loader": "^0.5.4",
        "karma": "^0.13.22",
        "karma-chrome-launcher": "^0.2.2",
        "karma-coverage": "^0.5.5",
        "karma-jasmine": "^0.3.8",
        "karma-mocha-reporter": "^2.0.0",
        "karma-phantomjs-launcher": "^1.0.0",
        "karma-sourcemap-loader": "^0.3.7",
        "karma-webpack": "1.7.0",
        "ng2lint": "0.0.10",
        "parse5": "^2.1.5",
        "phantomjs-polyfill": "0.0.2",
        "phantomjs-prebuilt": "^2.1.6",
        "protractor": "^3.2.1",
        "raw-loader": "0.5.1",
        "remap-istanbul": "^0.5.1",
        "rimraf": "^2.5.2",
        "source-map-loader": "^0.1.5",
        "style-loader": "^0.13.0",
        "ts-helper": "0.0.1",
        "ts-node": "^0.6.2",
        "tslint": "^3.6.0",
        "tslint-loader": "^2.1.3",
        "typedoc": "^0.3.12",
        "typescript": "~1.8.9",
        "typings": "^0.7.8",
        "url-loader": "^0.5.7",
        "webpack": "^1.12.14",
        "webpack-dev-server": "^1.14.1",
        "webpack-md5-hash": "^0.0.5"
      },
      "repository": {
        "type": "git",
        "url": "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/angularclass/angular2-webpack-starter.git"
      },
      "bugs": {
        "url": "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/angularclass/angular2-webpack-starter/issues"
      },
      "engines": {
        "node": ">= 4.2.1",
        "npm": ">= 3"
      }
    }
    
  5. oliverschenk commented on Mar 20, 2016

    @oliverschenk

    I installed latest angular2-webpack-starter and started it with no modifications. I also tried the package.json posted above by @alvipeo.

    I get the following:

    [default] C:/Develop/toolbox-client/node_modules/zone.js/dist/zone.js.d.ts (127,5):
        Duplicate identifier 'parent'.
    [default] C:/Develop/toolbox-client/node_modules/zone.js/dist/zone.js.d.ts (131,5):
        Duplicate identifier 'name'.
    [default] C:/Develop/toolbox-client/node_modules/zone.js/dist/zone.js.d.ts (219,5):
        Duplicate identifier 'current'.
    [default] C:/Develop/toolbox-client/node_modules/zone.js/dist/zone.js.d.ts (223,5):
        Duplicate identifier 'currentTask'.
    [default] C:/Develop/toolbox-client/node_modules/zone.js/dist/zone.js.d.ts (234,5):
        Duplicate identifier 'name'.
    [default] C:/Develop/toolbox-client/node_modules/zone.js/dist/zone.js.d.ts (238,5):
        Duplicate identifier 'properties'.
    

    .......etc.......

    Also

    [default] C:/Develop/toolbox-client/src/polyfills.ts (11,8):
        Exported external package typings file 'C:/Develop/toolbox-client/node_modules/zone.js/dist/zone.js.d.ts' is not a module. Please contact the package author to update the package definition.
    

    If I get rid of zone.js from typings.json then I only get:

    [default] C:/Develop/toolbox-client/src/polyfills.ts (11,8):
        Exported external package typings file 'C:/Develop/toolbox-client/node_modules/zone.js/dist/zone.js.d.ts' is not a module. Please contact the package author to update the package definition.
    

    But I also get the following javascript error in the browser:

    Uncaught TypeError: Cannot read property 'cancelTask' of undefined zone.js?e3a6:116

  6. msegers commented on Mar 20, 2016

    @msegers
    Author

    Will try above tomorrow. Happy to hear it's not just me

  7. PatrickJS commented on Mar 20, 2016

    @PatrickJS
    Owner

    can you pull latest

  8. xeor commented on Mar 20, 2016

    @xeor

    Removing selenium-webdriver from typings.json, and redo typings did it for me..

  9. msegers commented on Mar 20, 2016

    @msegers
    Author

    I pulled latest, however now I get this "Uncaught TypeError: core_1.View is not a function." on startup, so nothing works anymore. npm start doesn't show errors though. Is that the issue with Material2 maybe?

  10. PatrickJS commented on Mar 20, 2016

    @PatrickJS
    Owner

    @msegers material2 should be commented out. They need to update their repo
    related angular/components#213

  11. msegers commented on Mar 20, 2016

    @msegers
    Author

    Explains, I was using it already with angular 10, so now it's broken. That means that your pull should have resolved my problems since I don't see those around anymore.

  12. PatrickJS commented on Aug 1, 2016

    @PatrickJS
    Owner

    what's the error?

  13. PatrickJS commented on Aug 1, 2016

    @PatrickJS
    Owner

    ignore dist in tsconfig
    4a4cd48

  14. michaelwalters commented on Aug 23, 2016

    @michaelwalters

    @gdi2290 - I also added "typings" to the exclude:
    tsconfig.json:

    ...
    "exclude": [
        "node_modules",
        "dist",
        "typings"
      ],
    ...
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions