When trying to run the create-table.js script, this error shows
lunalubra opened this issue · comments
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.
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.
Thank you ;)
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.