2023-07-05 15:11:16 +02:00
|
|
|
---
|
|
|
|
title: 'Invalid `assetPrefix`'
|
|
|
|
---
|
2019-12-16 16:07:03 +01:00
|
|
|
|
2023-07-05 15:11:16 +02:00
|
|
|
## Why This Error Occurred
|
2019-12-16 16:07:03 +01:00
|
|
|
|
|
|
|
The value of `assetPrefix` in `next.config.js` is set to something that is not a `string`.
|
|
|
|
|
2023-07-05 15:11:16 +02:00
|
|
|
## Possible Ways to Fix It
|
2019-12-16 16:07:03 +01:00
|
|
|
|
|
|
|
Ensure that `assetPrefix` is a `string`.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
2023-07-05 15:11:16 +02:00
|
|
|
```js filename="next.config.js"
|
2019-12-16 16:07:03 +01:00
|
|
|
module.exports = {
|
|
|
|
assetPrefix: '/',
|
|
|
|
}
|
|
|
|
```
|