After deciding to upgrade to Typescript 2.0 alongside Protractor 4.0.5, I encountered several challenges while transitioning from typescript 1.8 and protractor 3.8. Here are the issues I faced:
This is my updated package.json configuration:
{
"dependencies": {
"core-js": "2.2.2",
"rxjs": "5.0.0-beta.6",
"web-request": "^1.0.3",
"zone.js": "0.6.12"
},
"devDependencies": {
"@types/jasmine": "^2.5.35",
"@types/node": "^6.0.45",
"@types/protractor": "^1.5.20",
"@types/selenium-webdriver": "^2.53.33",
"es6-promise": "3.1.2",
"es6-promise-loader": "1.0.1",
...
And here's a snippet of my revised package json:
"compilerOptions": {
"target": "es5",
...
}
Trying to execute protractor tests with this setup resulted in multiple errors such as:
node_modules\@types\selenium-webdriver\index.d.ts (12,11): Duplicate identifier 'Driver'.
node_modules\@types\selenium-webdriver\index.d.ts (46,11): Duplicate identifier 'Options'.
node_modules\@types\selenium-webdriver\index.d.ts (310,11): Duplicate identifier 'ServiceBuilder'.
...
I'm puzzled by these errors as everything seems properly configured. Shouldn't Protractor 4.0.5 be compatible with typescript 2.0? How can this issue be resolved?