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

Simply importing notion into an Astro project doesn't work #447

Open
tadaspetra opened this issue Aug 25, 2023 · 1 comment
Open

Simply importing notion into an Astro project doesn't work #447

tadaspetra opened this issue Aug 25, 2023 · 1 comment

Comments

@tadaspetra
Copy link

Describe the bug
Adding this script tag to an Astro project, causes it to not run the script at all.

<script>
  import { Client } from "@notionhq/client";
  console.log("notion")
  const notion = new Client({ auth: "<secret>"});
</script>

And shows this error on the client

Uncaught SyntaxError: The requested module '/node_modules/@notionhq/client/node_modules/whatwg-url/lib/public-api.js?v=0c9a2969' does not provide an export named 'default' (at index.mjs?v=0c9a2969:4:8)

To Reproduce
Node version: v16.14.2
Notion JS library version: ^2.2.11

Steps to reproduce the behavior:
Import Client from library

@a-barbieri
Copy link

It happens also when importing the library on a react component in Astro.

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

2 participants