I recently was working with a third-party library. I ran into the error "Uncaught SyntaxError: cannot use import statement outside…