Element type is invalid after updating to expo expo SDK 39

Please provide the following:

  1. SDK Version: 39
  2. Platforms(Android/iOS/web/all):Android/IOS

After upgrading version 38 to 39 i got the followong error: Element type is invalid: expected a string but got: undefined. Firstly i thought it was not related to new vesrion and to make sure I rolled back to version 38, but the error is gone. I’ve installed version 39 again and I can’t find problem for hours…

Finally I found where the problem was. It was in import expo-linear-gradient.
Before upgrading expo this import have been working fine:

import LinearGradient from “expo-linear-gradient/build/LinearGradient”;

But after it works this way:

import {LinearGradient} from “expo-linear-gradient/build/LinearGradient”;

1 Like

That’s quite strange. Even the SDK 36 docs have the import statement shown the second way.

From the beginning I think I imported LinearGradient in a wrong way, but somehow it have been working on EXPO SDK 38.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.