Skip to main content

Posts

Showing posts with the label nextjs

Sitecore headless Error: Invalid src prop on `next/image`, hostname is not configured under images in your `next.config.js`

 The Problem While trying to render an Image field in next js app, I got the below error on - The Solution To fix this, navigate to next.config.js in your next js app in VS Code and add the following entry in highlighted area in snapshot  -   {         protocol: 'https',         hostname: '<your hostname here>',         port: '',       }, Hope it helps you!

Sitecore Headless Error: Parse Error: Unexpected whitespace after header value

 The Problem This can occur to any developer trying to set up their first Sitecore headless next js app on local. I will skip the commands involved in setting up the app on local. When you are done setting up your next js app and execute jss start:connected to run the app, you may face the below error -  Error: Parse Error: Unexpected whitespace after header value The Solution  The whitespace after header value is something added by Feature-Policy setting in HTTP response headers in your local Sitecore instance in IIS. Delete this setting and the error shall go away - Hope it helps you!