Closed shuding closed 1 month ago
I got the same error and switched image optimization off.
I got the same error and switched image optimization off.
Same error as OP. Playing with next config and various solutions, but I suspect something isn't parsing between nextConfig and withNextra() on export.
@pplonski can you share your working config? Thanks!
I just used:
// next.config.js
const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.jsx",
});
module.exports = {
...withNextra(),
images: {
unoptimized: true,
},
};
From what I read the yarn next export
doesnt work with optimized images.
Working for me on non-Vercel & Vercel deploys:
"build": "node ./scripts/gen-rss.js && next build && next export"
const withNextra = require('nextra')(https://github.com/shuding/nextratheme-blog', './theme.config.js')
const nextConfig = { images: { loader: 'akamai', path: '/' } }
module.exports = withNextra(nextConfig)
* set build commands in deploy settings to:
```yarn install && yarn run build```
Discussed in https://github.com/shuding/nextra/discussions/1197