next-images TypeError: unsupported file type: undefined
RazaShehryar opened this issue · comments
Hi,
I have installed everything correctly but still, I am facing this issue.
next-images TypeError: unsupported file type: undefined
Here's my next.config.js
const { withExpo } = require('@expo/next-adapter')
const withPlugins = require('next-compose-plugins')
const withFonts = require('next-fonts')
const withImages = require('next-images')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true'
})
const withTM = require('next-transpile-modules')([
'app',
'@gorhom/bottom-sheet',
'react-doorman',
'react-native-doorman',
'@gorhom/portal',
'dripsy',
'@dripsy/core'
])
const nextConfig = {}
module.exports = withPlugins(
[
withTM,
withFonts,
withImages,
withBundleAnalyzer,
[withExpo, { projectRoot: __dirname + '/../..' }]
],
nextConfig
)
Hmm did you take a look at the with-navigation branch? Maybe remote your .next folder?
Hmm did you take a look at the with-navigation branch? Maybe remote your .next folder?
I did. But it isn't an issue with the navigation. Even if I import a single screen without navigation, it throws the undefined error if I try to import a static image like this
<Image source={require('./assets/logo.png'} />
okay nevermind, I had to add this to my nextConfig
const nextConfig = {
images: {
disableStaticImages: true
}
}