docu-notion icon indicating copy to clipboard operation
docu-notion copied to clipboard

Fails to build when columns are used in Notion page

Open davidmoore1 opened this issue 11 months ago • 3 comments

Describe the bug If you add a 2 or 3 column entry into a page on Notion, docu-notion fails when it attempts to convert that page

** Reproduction Steps ** I created a two column entry first by moving an image next to another one and it failed the build. I then put it back so that it built ok and then just manually added two columns by adding an entry, typing /co and then selecting 2 columns, and then entering the word "test" in each of the two columns and then tried to rebuild and it failed.

I got the following console output in the action output: /home/runner/work/appbuilder-docs/appbuilder-docs/node_modules/notion-client/src/notion-api.ts:54 throw new Error(Notion page not found "${uuidToId(pageId)}") ^ Error: Notion page not found "1f90f05bb663806c9ebfefb437c80cd2" at NotionAPI. (/home/runner/work/appbuilder-docs/appbuilder-docs/node_modules/notion-client/src/notion-api.ts:54:13) at step (/home/runner/work/appbuilder-docs/appbuilder-docs/node_modules/notion-client/build/cjs/notion-api.js:44:23) at Object.next (/home/runner/work/appbuilder-docs/appbuilder-docs/node_modules/notion-client/build/cjs/notion-api.js:25:53) at fulfilled (/home/runner/work/appbuilder-docs/appbuilder-docs/node_modules/notion-client/build/cjs/notion-api.js:16:58) at processTicksAndRejections (node:internal/process/task_queues:105:5) error Command failed with exit code 1.

Expected behavior The build would complete successfully. Hopefully the two images would appear side by side.

Screenshots This shows the part of the Notion page where I had the two columns defined (The Test 1/Test 2 lines are the single line with two columns) Image

davidmoore1 avatar May 20 '25 14:05 davidmoore1

Thanks @davidmoore1. Would you be interested in working on this?

hatton avatar May 20 '25 15:05 hatton

I think I would if I have someone I can ask questions of about docu-notion, since I haven't worked with the code before. Do you have any suggestions there?

davidmoore1 avatar May 20 '25 19:05 davidmoore1

@hatton For today, I've tracked it down to crashing in the ColumnTransformer.ts line 72 in GetColumnWidth() when it tries to get the page for the block (const unofficialPage = unofficialNotionClient.getPage(blockId); The block id it is passing is the block id for the first column. Not sure beyond that at this point

davidmoore1 avatar May 20 '25 21:05 davidmoore1