#Struggling with library update due to typings

3 messages · Page 1 of 1 (latest)

left hornet
#

Background:
My project used old version of puppeteer, it didn’t have its own types, so we used @types/puppeteer.

What happened:
I upgraded and now the lib has its own typings. A lot of stuff broke bc of that, mostly “Element | null is not Element” errors.

Question:
Is it possible to make my codebase use @types/puppeteer again on this new version instead?

unique coral
#

@left hornet Yes - you can do something like:

"paths": {
    "puppeteer": ["../node_modules/@types/puppeteer/"],
}

in tsconfig.json