Encountered an error while running protractor tests in visual studio code using npm test. The issue seems to be related to
node_modules/@types/jasmine/index.d.ts
. How can this error be resolved?
C:\MyFiles\NewTechonologies\Protractor\TypeScript\Test>npm test
> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="214459404c514d440c5558514452425348515561100f110f11">[email protected]</a> pretest C:\MyFiles\NewTechonologies\Protractor\TypeScript\Test
> npm run tsc
> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c2a7baa3afb2aea7efb6bbb2a7b1a1b0abb2b682f3ecf2ecf2">[email protected]</a> tsc C:\MyFiles\NewTechonologies\Protractor\TypeScript\Test
> tsc
node_modules/@types/jasmine/index.d.ts(26,41): error TS2314: Generic type 'Matchers<T>' requires 1 type argument(s).
...
(snip)
...
node_modules/@types/jasminewd2/index.d.ts(48,20): error TS2304: Cannot find name 'Expected'.
node_modules/@types/jasminewd2/index.d.ts(49,23): error TS2304: Cannot find name 'Expected'.
npm ERR! Windows_NT 6.1.7601
npm ERR! (additional error messages)
Provided below are the files utilized for executing protractor with typescript and jasmine framework in visual studio code:
package.json
{
"name": "example-typescript",
"version": "1.0.0",
"description": "a typescript example",
"author": "",
"license": "MIT",
"scripts": {
(script content)
},
"dependencies": {
(dependency details)
},
"devDependencies": {
(dev dependency details)
}
}
spec.ts
(typescript code snippet)
tsconfig.json
(typescript configuration details)