Nextjs @Latest with Strapi not working - FRONTEND

Are you writing JavaScript or TypeScript?

Your stack trace points to …/…/packages/domain/blog-strapi/api.js, so I assume you’re writing JavaScript.

So change from
export function getStrapiURL(path: string = “”): string {
to
export function getStrapiURL(path = “”) {

If you’re writing TypeScript, you probably need to change the file extension from .js to .ts and configure webpack to use the associated loader.

Also your quotes look fishy which might cause problems, too. Might come from the forum software, though. Change from “” to "";