Skip to content

Instantly share code, notes, and snippets.

@kapilpipaliya
Created January 27, 2020 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kapilpipaliya/3764418897163b408fd01a495ded264a to your computer and use it in GitHub Desktop.
Save kapilpipaliya/3764418897163b408fd01a495ded264a to your computer and use it in GitHub Desktop.
src/views/organization/layout.svelte:9:10 - error TS1259: Module '"/home/kapili3/k/cpp_stuff/todo_drogon_server/service/time/svelte/node_modules/url-pattern/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
9 import UrlPattern from 'url-pattern'
~~~~~~~~~~
node_modules/url-pattern/index.d.ts:21:1
21 export = UrlPattern;
~~~~~~~~~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.
@kapilpipaliya
Copy link
Author

i modified https://github.com/snd/url-pattern/blob/master/index.d.ts#L21 to export default UrlPattern in node_modules and it works. thanks

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