(SOLVED) Unable to export as static files
Answered
Birman posted this in #help-forum
BirmanOP
the I have been using Next JS to generate static files by running
Error message reads as attached in
In
Dependency versions in
Disclaimer - I was able to export as static files previously even if there were warnings for using
next build && next export. However only today I was not able to export as static files. I have not changed the next.config.js file from previous successful export. Why might this be happening? Any help or suggestion is welcome. Thanks for reading.Error message reads as attached in
error-log.txtIn
next.config.js/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
// For static exports only
trailingSlash: true,
images: { unoptimized: true }
}
module.exports = nextConfigDependency versions in
package.json "next": "12.2.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"sharp": "^0.31.1"Disclaimer - I was able to export as static files previously even if there were warnings for using
<img> tagsAnswered by Birman
My bad. Turns out I had one
<Image /> component being used while trying to export as static file.1 Reply
BirmanOP
My bad. Turns out I had one
<Image /> component being used while trying to export as static file.Answer