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

When trying to run the create-table.js script, this error shows #65

Open
lunalubra opened this issue Mar 25, 2021 · 3 comments
Open

When trying to run the create-table.js script, this error shows #65

lunalubra opened this issue Mar 25, 2021 · 3 comments

Comments

@lunalubra
Copy link

NOTION_TOKEN=
'8b37e3c2f5a6b88b8cf06153b85cc2fef716e75a2a0bfdc0776b78140104bcc730a931f0c7a5fda1812b8841462116e4d46b0d5a5c7692b1f8fba7a6612430eb13cfee8d9441f38ecfa115fe8e21'
BLOG_INDEX_ID=
'508aa820-0e7d-495a-85e4-7f1fb98b4330'
node scripts/create-table.js

(node:99922) UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object
at Function.keys ()
at getExistingexistingBlockId (/home/lucas/Desktop/gitrepostocheck/mom-blog/src/lib/notion/createTable.js:349:21)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async main (/home/lucas/Desktop/gitrepostocheck/mom-blog/src/lib/notion/createTable.js:20:25)
(Use node --trace-warnings ... to show where the warning was created)
(node:99922) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:99922) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@kyori19
Copy link

kyori19 commented Mar 25, 2021

Before answering to your question, you should revoke your token by logging out from notion as soon as possible.
Otherwise everyone can see and modify all notes in your notion account.

@lunalubra
Copy link
Author

Thank you ;)

@yusriyunus
Copy link

yusriyunus commented Apr 5, 2021

I have the same problem. Looks like notion using https://www.notion.so/api/v3/loadCachedPageChunk instead of https://www.notion.so/api/v3/loadPageChunk.

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

3 participants