EUnable to resolve module…. Expo fails to compile after upgrading to SDK40

  1. SDK Version: 40
  2. Platforms: all

Hi, after upgrading to SDK40 I get:

Unable to resolve module….

For any package (meaning if I remove one the next fails).
Error first noticed on react-native-svg (installed with expo install).

Tried to remove all of the caches, no luck.
Enabled ts (which has no meaning as the error states):

index.ts(.native|.ios.jsx|.native.jsx|.jsx|.ios.js|.native.js|.js|.ios.json|.native.json|.json)

If I downgrade to SDK39 everything works again (without resetting any caches).

Anyone have any idea of what’s going on here?

If anyone stumbles here, the error can be fixed by adding metro.config.js with ts and tsx files:

const { getDefaultConfig } = require('@expo/metro-config');

const defaultConfig = getDefaultConfig(__dirname);

defaultConfig.resolver.assetExts.push('ts');
defaultConfig.resolver.assetExts.push('tsx');

module.exports = defaultConfig;

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