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
Which package is this bug report for? If unsure which one to select, leave blank
No response
Issue description
The default puppeteer build fails TS build.
npx crawlee create test-crawler
cd test-crawler
npm run build
Result:
> test-crawler@0.0.1 build
> tsc
node_modules/@crawlee/browser-pool/playwright/playwright-controller.d.ts:5:82 - error TS2344: Type 'unknown' does not satisfy the constraint 'Dictionary<any> | undefined'.
5 export declare class PlaywrightController extends BrowserController<BrowserType, Parameters<BrowserType['launch']>[0], Browser> {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@crawlee/browser-pool/playwright/playwright-plugin.d.ts:7:74 - error TS2344: Type 'unknown' does not satisfy the constraint 'Dictionary<any> | undefined'.
7 export declare class PlaywrightPlugin extends BrowserPlugin<BrowserType, Parameters<BrowserType['launch']>[0], PlaywrightBrowser> {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@crawlee/browser-pool/playwright/playwright-plugin.d.ts:11:67 - error TS2344: Type 'unknown' does not satisfy the constraint 'Dictionary<any> | undefined'.
11 protected _createController(): BrowserController<BrowserType, Parameters<BrowserType['launch']>[0], PlaywrightBrowser>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@crawlee/browser-pool/utils.d.ts:5:281 - error TS2344: Type '[...Result, PlaywrightPlugin]' does not satisfy the constraint 'BrowserPlugin<CommonLibrary, Dictionary<any> | undefined, CommonBrowser, unknown, CommonPage>[]'.
Type 'PlaywrightPlugin | Result[number]' is not assignable to type 'BrowserPlugin<CommonLibrary, Dictionary<any> | undefined, CommonBrowser, unknown, CommonPage>'.
Type 'PlaywrightPlugin' is not assignable to type 'BrowserPlugin<CommonLibrary, Dictionary<any> | undefined, CommonBrowser, unknown, CommonPage>'.
Types of property 'launchOptions' are incompatible.
Type 'unknown' is not assignable to type 'Dictionary<any> | undefined'.
5 export declare type InferBrowserPluginArray<Input extends readonly unknown[], Result extends BrowserPlugin[] = []> = Input extends readonly [infer FirstValue, ...infer Rest] | [infer FirstValue, ...infer Rest] ? FirstValue extends PlaywrightPlugin ? InferBrowserPluginArray<Rest, [...Result, PlaywrightPlugin]> : FirstValue extends PuppeteerPlugin ? InferBrowserPluginArray<Rest, [...Result, PuppeteerPlugin]> : never : Input extends [] ? Result : Input extends (infer U)[] ? [U] extends [PuppeteerPlugin | PlaywrightPlugin] ? U[] : never : Result;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@crawlee/playwright/internals/playwright-crawler.d.ts:14:73 - error TS2344: Type 'PlaywrightCrawlingContext<Dictionary<any>>' does not satisfy the constraint 'BrowserCrawlingContext<unknown, CommonPage, Dictionary<any>, BrowserController<CommonLibrary, Dictionary<any> | undefined, CommonBrowser, unknown, CommonPage>, Dictionary<...>>'.
The types of 'browserController.browserPlugin' are incompatible between these types.
Type 'BrowserPlugin<BrowserType, unknown, Browser, unknown, any>' is not assignable to type 'BrowserPlugin<CommonLibrary, Dictionary<any> | undefined, CommonBrowser, unknown, CommonPage>'.
Type 'unknown' is not assignable to type 'Dictionary<any> | undefined'.
14 export interface PlaywrightRequestHandler extends BrowserRequestHandler<PlaywrightCrawlingContext> {
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@crawlee/playwright/internals/playwright-crawler.d.ts:17:73 - error TS2344: Type 'PlaywrightCrawlingContext<Dictionary<any>>' does not satisfy the constraint 'BrowserCrawlingContext<unknown, CommonPage, Dictionary<any>, BrowserController<CommonLibrary, Dictionary<any> | undefined, CommonBrowser, unknown, CommonPage>, Dictionary<...>>'.
17 export interface PlaywrightCrawlerOptions extends BrowserCrawlerOptions<PlaywrightCrawlingContext, {
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@crawlee/playwright/internals/playwright-crawler.d.ts:172:63 - error TS2344: Type '{ browserPlugins: [PlaywrightPlugin]; }' does not satisfy the constraint 'BrowserPoolOptions<BrowserPlugin<CommonLibrary, Dictionary<any> | undefined, CommonBrowser, unknown, CommonPage>>'.
Types of property 'browserPlugins' are incompatible.
Type '[PlaywrightPlugin]' is not assignable to type 'readonly BrowserPlugin<CommonLibrary, Dictionary<any> | undefined, CommonBrowser, unknown, CommonPage>[]'.
Type 'PlaywrightPlugin' is not assignable to type 'BrowserPlugin<CommonLibrary, Dictionary<any> | undefined, CommonBrowser, unknown, CommonPage>'.
172 export declare class PlaywrightCrawler extends BrowserCrawler<{
~
173 browserPlugins: [PlaywrightPlugin];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174 }, LaunchOptions, PlaywrightCrawlingContext> {
~
node_modules/@crawlee/playwright/internals/playwright-launcher.d.ts:75:65 - error TS2344: Type 'PlaywrightPlugin' does not satisfy the constraint 'BrowserPlugin<CommonLibrary, Dictionary<any> | undefined, CommonBrowser, unknown, CommonPage>'.
75 export declare class PlaywrightLauncher extends BrowserLauncher<PlaywrightPlugin> {
~~~~~~~~~~~~~~~~
Found 8 errors in 5 files.
Errors Files
1 node_modules/@crawlee/browser-pool/playwright/playwright-controller.d.ts:5
2 node_modules/@crawlee/browser-pool/playwright/playwright-plugin.d.ts:7
1 node_modules/@crawlee/browser-pool/utils.d.ts:5
3 node_modules/@crawlee/playwright/internals/playwright-crawler.d.ts:14
1 node_modules/@crawlee/playwright/internals/playwright-launcher.d.ts:75
Code sample
No response
Package version
^3.0.0
Node.js version
v19.0.0
Operating system
Ubuntu
Apify platform
Tick me if you encountered this issue on the Apify platform
Priority this issue should have
Low (slightly annoying)
I have tested this on the next release
No response
Other context
No response
The text was updated successfully, but these errors were encountered:
Which package is this bug report for? If unsure which one to select, leave blank
No response
Issue description
The default puppeteer build fails TS build.
Result:
Code sample
No response
Package version
^3.0.0
Node.js version
v19.0.0
Operating system
Ubuntu
Apify platform
Priority this issue should have
Low (slightly annoying)
I have tested this on the
next
releaseNo response
Other context
No response
The text was updated successfully, but these errors were encountered: