gpt4 book ai didi

angular - TS2440 : Import declaration conflicts with local declaration of 'ProtractorPlugin'

转载 作者:行者123 更新时间:2023-12-02 10:43:52 25 4
gpt4 key购买 nike

嗨,我正在尝试运行一个简单的 Protractor 测试( Protractor 新手),但我不断收到此错误。下面是我的 package.json

"devDependencies": {
"@angular-devkit/build-angular": "~0.803.8",
"@angular/cli": "~8.3.8",
"@angular/compiler-cli": "~8.2.9",
"@angular/language-service": "~8.2.9",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "12.12.7",
"codelyzer": "^5.0.0",
"husky": "^3.0.9",
"jasmine-core": "~3.4.0",
"jasmine-reporters": "^2.3.2",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"karma-junit-reporter": "^2.0.1",
"protractor": "~5.4.0",
"puppeteer": "^2.0.0",
"ts-node": "~7.0.0",
"tslint": "^5.15.0",
"typescript": "~3.6.4"
}

最佳答案

就我而言,问题是由于组件中的错误导入造成的。

我写错了

import { EventEmitter } from 'protractor';

不要在下面写导入:

import { EventEmitter } from '@angular/core';

关于angular - TS2440 : Import declaration conflicts with local declaration of 'ProtractorPlugin' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58877674/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com