Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Earthstar build problems #37

Open
michielbdejong opened this issue May 17, 2024 · 1 comment
Open

Earthstar build problems #37

michielbdejong opened this issue May 17, 2024 · 1 comment

Comments

@michielbdejong
Copy link
Member

> [email protected] build
> tsc -p tsconfig.json

node_modules/@sgwilym/isomorphic-streams/index.d.ts:40:19 - error TS2304: Cannot find name 'Transformer'.

40     transformer?: Transformer<I, O>,
                     ~~~~~~~~~~~

node_modules/@sgwilym/isomorphic-streams/index.d.ts:100:43 - error TS2304: Cannot find name 'BufferSource'.

100   implements ReadableWritablePair<string, BufferSource>
                                              ~~~~~~~~~~~~

node_modules/@sgwilym/isomorphic-streams/index.d.ts:103:37 - error TS2304: Cannot find name 'BufferSource'.

103   readonly writable: WritableStream<BufferSource>;
                                        ~~~~~~~~~~~~

node_modules/@sgwilym/urlpattern-polyfill/dist/index.d.ts:1:28 - error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.

1 import { URLPattern } from './url-pattern';
                             ~~~~~~~~~~~~~~~

node_modules/earthstar/types/_dnt.shims.d.ts:2:23 - error TS2688: Cannot find type definition file for 'ws'.

2 /// <reference types="ws" />
                        ~~

node_modules/earthstar/types/_dnt.shims.d.ts:7:22 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("isomorphic-blob")' call instead.

7 import { Blob } from "isomorphic-blob";
                       ~~~~~~~~~~~~~~~~~

node_modules/earthstar/types/_dnt.shims.d.ts:8:22 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("isomorphic-blob")' call instead.

8 export { Blob } from "isomorphic-blob";
                       ~~~~~~~~~~~~~~~~~

node_modules/earthstar/types/_dnt.shims.d.ts:9:44 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("isomorphic-undici-ponyfill")' call instead.

9 import { Request, Response, Headers } from "isomorphic-undici-ponyfill";
                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/earthstar/types/_dnt.shims.d.ts:10:44 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("isomorphic-undici-ponyfill")' call instead.

10 export { Request, Response, Headers } from "isomorphic-undici-ponyfill";
                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/earthstar/types/_dnt.shims.d.ts:11:128 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("@sgwilym/isomorphic-streams")' call instead.

11 import { WritableStream, TransformStream, ReadableStream, TransformStreamDefaultController, WritableStreamDefaultWriter } from "@sgwilym/isomorphic-streams";
                                                                                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/earthstar/types/_dnt.shims.d.ts:12:149 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("@sgwilym/isomorphic-streams")' call instead.

12 export { WritableStream, TransformStream, ReadableStream, TransformStreamDefaultController, type UnderlyingSink, WritableStreamDefaultWriter } from "@sgwilym/isomorphic-streams";
                                                                                                                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/earthstar/types/_dnt.shims.d.ts:15:42 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("textencoder-ponyfill")' call instead.

15 import { TextEncoder, TextDecoder } from "textencoder-ponyfill";
                                            ~~~~~~~~~~~~~~~~~~~~~~

node_modules/earthstar/types/_dnt.shims.d.ts:16:42 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("textencoder-ponyfill")' call instead.

16 export { TextEncoder, TextDecoder } from "textencoder-ponyfill";
                                            ~~~~~~~~~~~~~~~~~~~~~~

node_modules/earthstar/types/_dnt.shims.d.ts:17:42 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("@sgwilym/urlpattern-polyfill")' call instead.

17 import { URLPattern as URLPattern } from "@sgwilym/urlpattern-polyfill";
                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/earthstar/types/_dnt.shims.d.ts:18:42 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("@sgwilym/urlpattern-polyfill")' call instead.

18 export { URLPattern as URLPattern } from "@sgwilym/urlpattern-polyfill";
                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/earthstar/types/src/streams/stream_utils.d.ts:1:23 - error TS2688: Cannot find type definition file for 'ws'.

1 /// <reference types="ws" />
                        ~~

node_modules/earthstar/types/src/streams/stream_utils.d.ts:55:67 - error TS2304: Cannot find name 'Transformer'.

55 export declare class PassThroughTransformer<ChunkType> implements Transformer<ChunkType, ChunkType> {
                                                                     ~~~~~~~~~~~

node_modules/earthstar/types/src/streams/stream_utils.d.ts:72:155 - error TS2304: Cannot find name 'Transformer'.

72 export declare class ChannelTransformer<ChannelType extends string, KeyType extends string, ItemType extends Channelled<ChannelType, KeyType>> implements Transformer<ItemType, ItemType> {
                                                                                                                                                             ~~~~~~~~~~~

node_modules/earthstar/types/src/streams/stream_utils.d.ts:94:112 - error TS2304: Cannot find name 'MessageEvent'.

94 export declare function websocketReadable<T>(socketOrUrl: dntShim.WebSocket | string, prepareForQueue: (event: MessageEvent) => T): dntShim.ReadableStream<T>;
                                                                                                                  ~~~~~~~~~~~~

node_modules/earthstar/types/src/syncer/partner_web_client.d.ts:1:23 - error TS2688: Cannot find type definition file for 'ws'.

1 /// <reference types="ws" />
                        ~~

node_modules/textencoder-ponyfill/index.d.ts:19:15 - error TS2552: Cannot find name 'TextDecodeOptions'. Did you mean 'TextDecoderOptions'?

19     options?: TextDecodeOptions,
                 ~~~~~~~~~~~~~~~~~


Found 21 errors in 6 files.

Errors  Files
     3  node_modules/@sgwilym/isomorphic-streams/index.d.ts:40
     1  node_modules/@sgwilym/urlpattern-polyfill/dist/index.d.ts:1
    11  node_modules/earthstar/types/_dnt.shims.d.ts:2
     4  node_modules/earthstar/types/src/streams/stream_utils.d.ts:1
     1  node_modules/earthstar/types/src/syncer/partner_web_client.d.ts:1
     1  node_modules/textencoder-ponyfill/index.d.ts:19
@michielbdejong
Copy link
Member Author

Reported it in earthstar-project/earthstar#331 - maybe someone there can help

@michielbdejong michielbdejong transferred this issue from ledgerloops/strategy-pit May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant