Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Duplicate identifier error #3792

Closed
Closed
@BorntraegerMarc

Description

@BorntraegerMarc
  • Node Version: 6.9.1
  • Protractor Version: 4.0.11
  • Angular Version: 2.1.2
  • Operating System and Version chrome, ubuntu 16 LTS
  • Your protractor configuration file
exports.config = {
    seleniumAddress: 'http://localhost:4444/wd/hub',
    specs: ['./protractor/**-spec.js'],

    // Capabilities to be passed to the webdriver instance.
    capabilities: {
        'browserName': 'chrome'
    },

    // Options to be passed to Jasmine-node.
    jasmineNodeOpts: {
        showColors: true
    }
};

Shouldn't https://github.com/angular/protractor/blob/master/package.json#L15 be declared as a dev dependency?
Opened up this bug after submitting: DefinitelyTyped/DefinitelyTyped#13064

I've started a new angular2 project and included the following dev dependency:
"@types/mocha": "2.2.33",

It installs correctly however when I run:
webpack --config webpack.config.dev.js --progress --profile --watch

I get:

[at-loader] node_modules/@types/jasmine/index.d.ts:15:18 
    Duplicate identifier 'xit'. 

[at-loader] node_modules/@types/mocha/index.d.ts:33:13 
    Duplicate identifier 'describe'. 

[at-loader] node_modules/@types/mocha/index.d.ts:34:13 
    Duplicate identifier 'xdescribe'. 

[at-loader] node_modules/@types/mocha/index.d.ts:39:13 
    Duplicate identifier 'it'. 

[at-loader] node_modules/@types/mocha/index.d.ts:40:13 
    Duplicate identifier 'xit'. 

My webpack config file:

var webpack = require('webpack');

module.exports = {
    devtool: 'cheap-module-eval-source-map',

    output: {
        path: './public/js/app',
        publicPath: "/js/app/",
        filename: 'bundle.js',
        chunkFilename: '[id].chunk.js'
    },
    entry: {
        'app': './assets/app/main.polymer.ts'
    },

    resolve: {
        extensions: ['.js', '.ts']
    },

    module: {
        loaders: [
            {
                test: /\.ts$/,
                loaders: [
                    'awesome-typescript-loader',
                    'angular2-template-loader',
                    'angular2-router-loader'
                ]
            },
            {
                test: /\.html$/,
                loader: 'html'
            },
            {
                test: /\.css$/,
                loader: 'raw'
            }
        ]
    },

    plugins: [
        new webpack.ContextReplacementPlugin(
            // The (\\|\/) piece accounts for path separators in *nix and Windows
            /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
            './src' // location of your src
        )
    ]
};

Same thing happens with @types/jasmine:
Just found out that the errors:

[at-loader] node_modules/@types/jasmine/index.d.ts:9:18 
    Duplicate identifier 'describe'. 

[at-loader] node_modules/@types/jasmine/index.d.ts:11:18 
    Duplicate identifier 'xdescribe'. 

[at-loader] node_modules/@types/jasmine/index.d.ts:13:18 
    Duplicate identifier 'it'. 

[at-loader] node_modules/@types/jasmine/index.d.ts:15:18 
    Duplicate identifier 'xit'. 

Apparently this happens when I write my tests with mocha and use protractor for e2e tests.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions