You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to compile my TS based project which uses WDIO as a dependency, and getting stuck on this error:
node_modules/puppeteer-core/lib/esm/puppeteer/common/Debug.d.ts:22:62 - error TS7016: Could not find a declaration file for module 'debug'. '/Users/jlipps/Code/gh/jlipps/appium-ocr-plugin/node_modules/puppeteer-core/node_modules/debug/src/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/debug` if it exists or add a new declaration (.d.ts) file containing `declare module 'debug';`
22 export declare function importDebug(): Promise<typeof import('debug')>;
I'm not using puppeteer-core at all. It appears to be imported by WDIO.
Unfortunately the webdriverio package currently has puppeteer as a sub-dependency. I have planned to change that by embedding all browser drivers into webdriverio. Until that happened I recommend to work around this issue by following the suggestions mentioned in the error message or use the --transpile-only parameter to just suppress this message.
OK, thanks @christian-bromann! I've followed the type dep workaround for now. Sounds like this is pretty low priority but was just a surprise mostly that it wasn't "clean" to use wdio in a ts project in this way.
Given this would be a breaking change, I will add it to the v9 roadmap. I suggest to move puppeteer-core to a peer-dependency and verify that it is installed when calling getPuppeteer.
Have you read the Contributing Guidelines on issues?
WebdriverIO Version
8.12.1
Node.js Version
18.15.0
Mode
Standalone Mode
Which capabilities are you using?
What happened?
Trying to compile my TS based project which uses WDIO as a dependency, and getting stuck on this error:
I'm not using
puppeteer-core
at all. It appears to be imported by WDIO.What is your expected behavior?
No WDIO-related TS build issues
How to reproduce the bug.
Try to build this project at this branch: https://github.com/jlipps/appium-ocr-plugin/tree/jlipps/updates
Relevant log output
Code of Conduct
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: