From the error screenshot, I suspect the list title parameter you specified in getByTitle()
is not correct, thus it did not find such a list.
For example, my SPO site has below document library, it's a default library after site creation.
Its list title is 'Documents'. 'Shared Documents' is a library name or root folder. You can find the title of a list through list/library settings:
Best Regards,
Baker Kong
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.