Open jmorey28 opened 2 years ago
I have the same problem!
I am facing the same issue as well.
I have followed the instructions in the docs.
The problem is because withImages()
is not being recognised as a function
@jmorey28 @gregogalante did you manage to fix it?
Cheers
Same issue here ðŸ˜
"next-images": "^1.8.4",
This config works for me. cheers.
// @generated: @expo/next-adapter@2.1.52
// Learn more: https://docs.expo.io/guides/using-nextjs/
const { withExpo } = require("@expo/next-adapter");
const withPlugins = require("next-compose-plugins");
const withTM = require("next-transpile-modules")(["react-native-web"]);
const withImages = require("next-images");
module.exports = withPlugins(
[
withTM,
[withExpo, { projectRoot: __dirname }],
[
withImages,
{
projectRoot: __dirname,
// fileExtensions: ["png"],
// disableStaticImages: true,
// esModule: true,
images: {
fileExtensions: ["png"],
disableStaticImages: true,
// esModule: true,
},
},
],
],
{}
);
I am using withImages as documented in the Expo documentation but am getting TypeError: Cannot convert undefined or null to object.
Here is the link to the documentation https://docs.expo.dev/guides/using-nextjs/#image-support
And here is the implementation: