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

Cannot read properties of undefined (reading 'title')

Open mannipulator opened this issue 2 years ago • 6 comments

Hello again ;)

first of all: Thanks for this blazing fast bugfix today, that seems to work.

Now I found this error-message:

C:\Users\user1\Documents\NotionTranslator>notion-translator --from en --to id --url https://www.notion.so/MyNotionPage

Wait a minute! Now translating the following Notion page:
https://www.notion.so/MyNotionPage

(this may take some time) ...........C:\Users\user1\AppData\Roaming\npm\node_modules\notion-translator\index.js:376
  const newTitle = newPage.properties.title.title[0];
                                            ^

TypeError: Cannot read properties of undefined (reading 'title')
    at createNewPageForTranslation (C:\Users\user1\AppData\Roaming\npm\node_modules\notion-translator\index.js:376:45)
    at C:\Users\user1\AppData\Roaming\npm\node_modules\notion-translator\index.js:421:25
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.8.0

mannipulator avatar Oct 06 '23 13:10 mannipulator

Hello, I've got the same error 😉

root@3c1b4c787426:~# notion-translator   --from en   --to pl   --url https://www.notion.so/reloh/Navigating-the-WebUI-f3137476e4fa4c17a452965bed42fb8f   

Wait a minute! Now translating the following Notion page:
https://www.notion.so/reloh/Navigating-the-WebUI-f3137476e4fa4c17a452965bed42fb8f

(this may take some time) ........./usr/local/lib/node_modules/notion-translator/index.js:376
  const newTitle = newPage.properties.title.title[0];
                                            ^

TypeError: Cannot read properties of undefined (reading 'title')
    at createNewPageForTranslation (/usr/local/lib/node_modules/notion-translator/index.js:376:45)
    at /usr/local/lib/node_modules/notion-translator/index.js:421:25
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.8.0

RelohDev avatar Oct 12 '23 15:10 RelohDev

Does anyone have a workaround for that bug?

mannipulator avatar Oct 27 '23 05:10 mannipulator

Hi, I have the same issue. Did you find a solution?

Domnin-unchain avatar Dec 26 '23 04:12 Domnin-unchain

I'm facing the same issue

nazmy-achmad avatar Jan 08 '24 02:01 nazmy-achmad

i got the same issue image

Mys1ery avatar Oct 15 '24 07:10 Mys1ery

i fix this bug. image for me, just replace "newPage.properties.title.title[0]" with "newPage.properties.Name.title[0]", then it will work well

Mys1ery avatar Oct 15 '24 12:10 Mys1ery