eth-infinitism / bundler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error using `yarn preprocess`

saraspaudel opened this issue · comments

commented

Node v18.15.0

yarn preprocess
yarn run v1.22.19
$ yarn lerna-clear && yarn hardhat-compile && yarn lerna-tsc
$ lerna run clear
lerna notice cli v5.6.2
lerna info Executing command in 3 packages: "yarn run clear"
lerna info run Ran npm script 'clear' in '@account-abstraction/utils' in 0.2s:
$ rm -rf dist artifacts cache src/types
lerna info run Ran npm script 'clear' in '@account-abstraction/sdk' in 0.1s:
$ rm -rf dist artifacts cache
lerna info run Ran npm script 'clear' in '@account-abstraction/bundler' in 0.1s:
$ rm -rf dist artifacts cache src/types
lerna success run Ran npm script 'clear' in 3 packages in 0.5s:
lerna success - @account-abstraction/bundler
lerna success - @account-abstraction/sdk
lerna success - @account-abstraction/utils
$ lerna run hardhat-compile
lerna notice cli v5.6.2
lerna info Executing command in 2 packages: "yarn run hardhat-compile"
lerna info run Ran npm script 'hardhat-compile' in '@account-abstraction/utils' in 1.8s:
$ hardhat compile
Generating typings for: 19 artifacts in dir: src/types for target: ethers-v5
Successfully generated 60 typings!
Compiled 20 Solidity files successfully
lerna info run Ran npm script 'hardhat-compile' in '@account-abstraction/bundler' in 3.8s:
$ hardhat compile
Generating typings for: 39 artifacts in dir: src/types for target: ethers-v5
Successfully generated 112 typings!
Compiled 34 Solidity files successfully
lerna success run Ran npm script 'hardhat-compile' in 2 packages in 5.6s:
lerna success - @account-abstraction/bundler
lerna success - @account-abstraction/utils
$ lerna run tsc --scope @account-abstraction/*
lerna notice cli v5.6.2
lerna notice filter including "@account-abstraction/"
lerna info filter [ '@account-abstraction/
' ]
lerna info Executing command in 3 packages: "yarn run tsc"
lerna ERR! yarn run tsc exited 2 in '@account-abstraction/utils'
lerna ERR! yarn run tsc stdout:
$ tsc
../../node_modules/@types/node/globals.d.ts(47,11): error TS2300: Duplicate identifier 'AbortController'.
../../node_modules/@types/node/globals.d.ts(60,11): error TS2300: Duplicate identifier 'AbortSignal'.
../../node_modules/@types/node/globals.d.ts(67,13): error TS2300: Duplicate identifier 'AbortController'.
../../node_modules/@types/node/globals.d.ts(74,13): error TS2300: Duplicate identifier 'AbortSignal'.
../../node_modules/typescript/lib/lib.dom.d.ts(2042,11): error TS2300: Duplicate identifier 'AbortController'.
../../node_modules/typescript/lib/lib.dom.d.ts(2049,13): error TS2300: Duplicate identifier 'AbortController'.
../../node_modules/typescript/lib/lib.dom.d.ts(2059,11): error TS2300: Duplicate identifier 'AbortSignal'.
../../node_modules/typescript/lib/lib.dom.d.ts(2071,13): error TS2300: Duplicate identifier 'AbortSignal'.
../../node_modules/typescript/lib/lib.dom.d.ts(5562,11): error TS2300: Duplicate identifier 'FormData'.
../../node_modules/typescript/lib/lib.dom.d.ts(5572,13): error TS2300: Duplicate identifier 'FormData'.
../../node_modules/typescript/lib/lib.dom.d.ts(14499,11): error TS2300: Duplicate identifier 'URL'.
../../node_modules/typescript/lib/lib.dom.d.ts(14516,13): error TS2300: Duplicate identifier 'URL'.
../../node_modules/typescript/lib/lib.dom.d.ts(14526,11): error TS2300: Duplicate identifier 'URLSearchParams'.
../../node_modules/typescript/lib/lib.dom.d.ts(14545,13): error TS2300: Duplicate identifier 'URLSearchParams'.
../../node_modules/typescript/lib/lib.dom.d.ts(18345,6): error TS2300: Duplicate identifier 'RequestInfo'.
../../node_modules/typescript/lib/lib.dom.d.ts(18505,6): error TS2300: Duplicate identifier 'XMLHttpRequestResponseType'.
../../node_modules/typescript/lib/lib.dom.iterable.d.ts(86,11): error TS2300: Duplicate identifier 'FormData'.
../../node_modules/typescript/lib/lib.dom.iterable.d.ts(263,11): error TS2300: Duplicate identifier 'URLSearchParams'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(69,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'Blob' must be of type '{ new (blobParts?: BlobPart[] | undefined, options?: BlobPropertyBag | undefined): Blob; prototype: Blob; }', but here has type '{ new (blobParts?: (string | Blob)[] | undefined, options?: BlobOptions | undefined): Blob; prototype: Blob; }'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(88,15): error TS2300: Duplicate identifier 'FormData'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(112,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'Headers' must be of type '{ new (init?: HeadersInit | undefined): Headers; prototype: Headers; }', but here has type '{ new (init?: HeadersInit_ | undefined): Headers; prototype: Headers; }'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(146,3): error TS2717: Subsequent property declarations must have the same type. Property 'body' must be of type 'BodyInit | null | undefined', but here has type 'BodyInit_ | undefined'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(148,3): error TS2717: Subsequent property declarations must have the same type. Property 'headers' must be of type 'HeadersInit | undefined', but here has type 'HeadersInit_ | undefined'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(154,3): error TS2717: Subsequent property declarations must have the same type. Property 'window' must be of type 'null | undefined', but here has type 'any'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(155,3): error TS2717: Subsequent property declarations must have the same type. Property 'signal' must be of type 'AbortSignal | null | undefined', but here has type 'AbortSignal | undefined'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(168,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'Request' must be of type '{ new (input: URL | RequestInfo, init?: RequestInit | undefined): Request; prototype: Request; }', but here has type '{ new (input: string | Request, init?: RequestInit | undefined): Request; prototype: Request; }'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(173,14): error TS2300: Duplicate identifier 'RequestInfo'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(176,3): error TS2717: Subsequent property declarations must have the same type. Property 'headers' must be of type 'HeadersInit | undefined', but here has type 'HeadersInit_ | undefined'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(192,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'Response' must be of type '{ new (body?: BodyInit | null | undefined, init?: ResponseInit | undefined): Response; prototype: Response; error(): Response; redirect(url: string | URL, status?: number | undefined): Response; }', but here has type '{ new (body?: BodyInit_ | undefined, init?: ResponseInit | undefined): Response; prototype: Response; error: () => Response; redirect: (url: string, status?: number | undefined) => Response; }'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(282,3): error TS2717: Subsequent property declarations must have the same type. Property 'abort' must be of type 'ProgressEvent', but here has type 'ProgressEvent'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(283,3): error TS2717: Subsequent property declarations must have the same type. Property 'error' must be of type 'ProgressEvent', but here has type 'ProgressEvent'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(284,3): error TS2717: Subsequent property declarations must have the same type. Property 'load' must be of type 'ProgressEvent', but here has type 'ProgressEvent'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(285,3): error TS2717: Subsequent property declarations must have the same type. Property 'loadend' must be of type 'ProgressEvent', but here has type 'ProgressEvent'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(286,3): error TS2717: Subsequent property declarations must have the same type. Property 'loadstart' must be of type 'ProgressEvent', but here has type 'ProgressEvent'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(287,3): error TS2717: Subsequent property declarations must have the same type. Property 'progress' must be of type 'ProgressEvent', but here has type 'ProgressEvent'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(288,3): error TS2717: Subsequent property declarations must have the same type. Property 'timeout' must be of type 'ProgressEvent', but here has type 'ProgressEvent'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(341,14): error TS2300: Duplicate identifier 'XMLHttpRequestResponseType'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(354,15): error TS2300: Duplicate identifier 'URL'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(379,15): error TS2300: Duplicate identifier 'URLSearchParams'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(437,3): error TS2717: Subsequent property declarations must have the same type. Property 'onopen' must be of type '((this: WebSocket, ev: Event) => any) | null', but here has type '(() => void) | null'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(438,3): error TS2717: Subsequent property declarations must have the same type. Property 'onmessage' must be of type '((this: WebSocket, ev: MessageEvent) => any) | null', but here has type '((event: WebSocketMessageEvent) => void) | null'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(439,3): error TS2717: Subsequent property declarations must have the same type. Property 'onerror' must be of type '((this: WebSocket, ev: Event) => any) | null', but here has type '((event: WebSocketErrorEvent) => void) | null'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(440,3): error TS2717: Subsequent property declarations must have the same type. Property 'onclose' must be of type '((this: WebSocket, ev: CloseEvent) => any) | null', but here has type '((event: WebSocketCloseEvent) => void) | null'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(441,3): error TS2717: Subsequent property declarations must have the same type. Property 'addEventListener' must be of type '{ (type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void; (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | ... 1 more ... | undefined): void; }', but here has type 'WebsocketEventListener'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(442,3): error TS2717: Subsequent property declarations must have the same type. Property 'removeEventListener' must be of type '{ (type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions | undefined): void; (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | ... 1 more ... | undefined): void; }', but here has type 'WebsocketEventListener'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(445,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'WebSocket' must be of type '{ new (url: string | URL, protocols?: string | string[] | undefined): WebSocket; prototype: WebSocket; readonly CLOSED: number; readonly CLOSING: number; readonly CONNECTING: number; readonly OPEN: number; }', but here has type '{ new (uri: string, protocols?: string | string[] | null | undefined, options?: { [optionName: string]: any; headers: { [headerName: string]: string; }; } | null | undefined): WebSocket; ... 4 more ...; readonly OPEN: number; }'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(469,15): error TS2300: Duplicate identifier 'AbortSignal'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(469,15): error TS2420: Class 'AbortSignal' incorrectly implements interface 'EventTarget'.
Property 'dispatchEvent' is missing in type 'AbortSignal' but required in type 'EventTarget'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(504,15): error TS2300: Duplicate identifier 'AbortController'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(529,12): error TS2717: Subsequent property declarations must have the same type. Property 'error' must be of type 'DOMException | null', but here has type 'Error | null'.
../../../../../node_modules/@types/react-native/modules/globals.d.ts(539,12): error TS2717: Subsequent property declarations must have the same type. Property 'result' must be of type 'string | ArrayBuffer | null', but here has type 'string | ArrayBuffer'.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run tsc stderr:
error Command failed with exit code 2.
lerna ERR! yarn run tsc exited 2 in '@account-abstraction/utils'
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The bundler build and runs for us, as well as in the CI server.
Maybe it has to do with node version: please make sure you're using node 18 or 16, and not 19

commented

Node v18.15.0

I am in Node v18.15.0 Mac M1

commented

Also, please let's specify engines in package.json https://docs.npmjs.com/cli/v9/configuring-npm/package-json#engines

commented

It works on Github Codespaces. It must be my local setup. Thank you.

please give more information about your environment.
it works on the cloud (CI), and locally on linux and mac.
could you be using Windows ? We've never tried it on a windows platform..