I'm currently utilizing the webdriverio mocha framework with typescript. @wdio/cli": "^7.25.0" NodeJs v16.13.2 NPM V8.1.2
Encountering the following error in tsconfig.json
JSON schema for the TypeScript compiler's configuration file
Cannot find type definition file for '@wdio/globals/types'.
The file is in the program because:
Entry point of type library '@wdio/globals/types' specified in compilerOptions
My tsconfig.json
{
"compilerOptions":
{
"moduleResolution": "node",
"module": "CommonJS",
"types":
[
"node",
"@wdio/globals/types",
"expect-webdriverio",
"@wdio/mocha-framework",
],
"lib":
[
"dom",
"es7"
],
"target": "es2022"
}
}
My package.json
{
"name": "mocha-template",
"version": "1.0.0",
"description": "",
"main": "index.js",
"keywords": [],
"author": "",
"license": "ISC",
"scripts":
{
"WDIO": "npx wdio run ./test/config/wdio.web.conf.ts"
},
"dependencies": {...}
Managing to execute my tests, yet bothered by this persisting error message.
Whenever I open a test file, errors show up for browser
and $
.
How can I tackle this issue?
Regarding $
Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig.
For browser
Cannot find name 'browser'.