This error causes in React-based apps, in my case it was in Next.JS. Because of apostrophe sign.
Read more →
It gives error when you want to set the next.js width to 100% and fill the full height of its container.
One of your pages that leverages the next/image component, passed a src value that uses a hostname in the URL that isn’t defined in the images.remotePatterns in next.config.js.