Skip to content

fix: url.d.ts is not a module #58

Description

@robertsLando

I got this error on tsc compiler when compiling my application:

- error TS2306: File '/xxx/node_modules/native-url/third_party/url.d.ts' is not a module.

23 import url from 'native-url'

Here is the diff that solved my problem:

diff --git a/node_modules/native-url/third_party/url.d.ts b/node_modules/native-url/third_party/url.d.ts
index ced41a3..b745f83 100644
--- a/node_modules/native-url/third_party/url.d.ts
+++ b/node_modules/native-url/third_party/url.d.ts
@@ -141,3 +141,5 @@ declare module 'url' {
     [Symbol.iterator](): IterableIterator<[string, string]>;
   }
 }
+
+export default url;
\ No newline at end of file

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions