The value of assetPrefix in next.config.js is set to something that is not a string.
assetPrefix
next.config.js
string
Ensure that assetPrefix is a string.
Example:
module.exports = { assetPrefix: '/', }