We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I used the following code to run the library (of course, I used an actual token):
const Notion = require("notion-api-js"); let api = new Notion({ token: "<some token>" });
I end up getting a TypeError upon running:
TypeError: Notion is not a constructor
The text was updated successfully, but these errors were encountered:
Hi there,
thanks for clarifying! You need to import it like that using the require syntax:
const Notion = require("notion-api-js").default; // following code
I will edit the readme so others won't have the same issue! Thank you 😄
Sorry, something went wrong.
Hi Tim,
adding the .default at the end really helped. The wrapper works for me now. Thank you for clarifying this.
.default
cstrnt
No branches or pull requests
I used the following code to run the library (of course, I used an actual token):
I end up getting a TypeError upon running:
The text was updated successfully, but these errors were encountered: