these two tools apparently let you rip borrowed audiobooks from this service named libby. although i haven't tested them. https://github.com/ping/odmpy https://github.com/bookbonobo/libby-download-extension
also, have you checked the index? stuff like this is usually there.
from the error it looks like you're importing an es module inside a common.js environment. but as @clif@lemmy.world said, there are several things that could cause this.