After deleting node modules and package-lock.json, I am getting the above error, when I reload any page. When I restart the project it works fine for the first time. But again when i reload the page, showing a blank page and giving the above error in the console.
next.config.js
const withSass = require('@zeit/next-sass')
const withCSS = require('@zeit/next-css');
const withFonts = require('next-fonts');
const withPlugins = require('next-compose-plugins');
const optimizedImages = require('next-optimized-images');
module.exports = withPlugins([
[optimizedImages, {
inlineImageLimit: 8192,
imagesFolder: 'images',
imagesName: '[name]-[hash].[ext]',
handleImages: ['jpeg', 'jpg', 'png', 'svg', 'webp', 'gif', 'ico'],
optimizeImages: true,
optimizeImagesInDev: false,
mozjpeg: {
quality: 80,
},
optipng: {
optimizationLevel: 3,
},
pngquant: false,
gifsicle: {
interlaced: true,
optimizationLevel: 3,
},
webp: {
preset: 'default',
quality: 75,
},
}],
[withCSS],[withFonts],[withSass]
]);
Try removing the .next
directory. That is what worked for me :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With