I followed the guide but I'm getting stuck at the
npm run build
part. Here is the output of my console. I also got a warning regarding Puppeteer being deprecated. Any thoughts on what I did wrong and how to resolve this?
Code:
root@flaresolverr:/usr/local/share/FlareSolverr # npm run build
> flaresolverr@2.2.1 build
> tsc
src/controllers/v1.ts:2:24 - error TS2307: Cannot find module 'devtools-protocol' or its corresponding type declarations.
2 import {Protocol} from "devtools-protocol";
~~~~~~~~~~~~~~~~~~~
src/providers/cloudflare.ts:1:34 - error TS7016: Could not find a declaration file for module 'puppeteer'. '/usr/local/share/FlareSolverr/node_modules/puppeteer/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/puppeteer` if it exists or add a new declaration (.d.ts) file containing `declare module 'puppeteer';`
1 import {Page, HTTPResponse} from 'puppeteer'
~~~~~~~~~~~
src/providers/cloudflare.ts:63:53 - error TS7006: Parameter 'selector' implicitly has an 'any' type.
63 const displayStyle = await page.evaluate((selector) => {
~~~~~~~~
src/services/sessions.ts:3:23 - error TS7016: Could not find a declaration file for module 'puppeteer'. '/usr/local/share/FlareSolverr/node_modules/puppeteer/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/puppeteer` if it exists or add a new declaration (.d.ts) file containing `declare module 'puppeteer';`
3 import {Browser} from 'puppeteer'
~~~~~~~~~~~
src/services/sessions.ts:4:24 - error TS2307: Cannot find module 'devtools-protocol' or its corresponding type declarations.
4 import {Protocol} from "devtools-protocol";
~~~~~~~~~~~~~~~~~~~
src/services/solver.ts:1:34 - error TS7016: Could not find a declaration file for module 'puppeteer'. '/usr/local/share/FlareSolverr/node_modules/puppeteer/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/puppeteer` if it exists or add a new declaration (.d.ts) file containing `declare module 'puppeteer';`
1 import {Page, HTTPResponse} from 'puppeteer'
~~~~~~~~~~~
Found 6 errors.