TypeError: this._config.serializer.isThirdPartyModule is not a function

Hello,

I’ve searched everywhere I can think of to find a solution to this. I’m trying a fully managed build for iOS in EAS and it keeps failing at the Fastline step. The build is using SDK49.

The build runs fine locally and even running npx expo export is fine. I’ve also ran run npx expo install --fix and everything was fine there. Oh and the build was fine on SDK48, this build is actually upgrading to SDK49.

The fail is caused by this error:

+ [[ '' != false ]]
+ [[ false == false ]]
+ EXTRA_ARGS=' --minify false'
+ /Users/expo/.nvm/versions/node/v18.18.0/bin/node /Users/expo/workingdir/build/node_modules/@expo/cli/build/bin/cli export:embed --entry-file node_modules/expo/AppEntry.js --platform ios --dev false --reset-cache --bundle-output /Users/expo/Library/Developer/Xcode/DerivedData/Trovier-dmwprmjqvcvtgzbuuekqkdfuocfr/Build/Intermediates.noindex/ArchiveIntermediates/Trovier/BuildProductsPath/Release-iphoneos/main.jsbundle --assets-dest /Users/expo/Library/Developer/Xcode/DerivedData/Trovier-dmwprmjqvcvtgzbuuekqkdfuocfr/Build/Intermediates.noindex/ArchiveIntermediates/Trovier/BuildProductsPath/Release-iphoneos/Trovier.app --minify false
warning: Bundler cache is empty, rebuilding (this may take a minute)
TypeError: this._config.serializer.isThirdPartyModule is not a function
TypeError: this._config.serializer.isThirdPartyModule is not a function
    at Server._shouldAddModuleToIgnoreList (/Users/expo/workingdir/build/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/Server.js:1095:31)
    at Object.shouldAddToIgnoreList (/Users/expo/workingdir/build/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/Server.js:142:14)
    at getSourceMapInfo (/Users/expo/workingdir/build/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/Serializers/helpers/getSourceMapInfo.js:18:24)
    at processNextModule (/Users/expo/workingdir/build/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/Serializers/sourceMapGenerator.js:30:18)
    at workLoop (/Users/expo/workingdir/build/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/Serializers/sourceMapGenerator.js:40:22)
    at getSourceMapInfosImpl (/Users/expo/workingdir/build/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/Serializers/sourceMapGenerator.js:60:3)
    at sourceMapGenerator (/Users/expo/workingdir/build/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/Serializers/sourceMapGenerator.js:64:3)
    at sourceMapString (/Users/expo/workingdir/build/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/Serializers/sourceMapString.js:16:10)
    at Server.build (/Users/expo/workingdir/build/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/Server.js:165:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
+ [[ '' == false ]]
+ EXTRA_COMPILER_ARGS=
+ [[ false == true ]]
+ EXTRA_COMPILER_ARGS=-O

But is really not giving me anything else to go on and my project is not using the @react-native-community/cli-plugin-metro directly, I can only assume its a dependency of something.

I wonder if anyone has any pointers where to look next? as I’m a bit stuck. Happy to share any other info I have just not sure what would be useful right now.

best,
Duncan

Strange. Do you have some custom metro config?

Hey @wodin ,

I don’t “think” so. I am using @expo/metro-config 0.10.7 and the only config I’m aware of is:

module.exports = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: true,
      },
    }),
  },
}

I guess I could try removing this and seeing if anything changes. Is there anywhere else where config for metro could live?

It looks like you’re not modifying the default config, but rather overwriting it with your own config. Try doing it like the example here:

So maybe like this:

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

const config = getDefaultConfig(__dirname);

config.transformer.getTransformOptions = async () => ({
  transform: {
    experimentalImportSupport: false,
    inlineRequires: true,
  },
});

module.exports = config;

EDIT: Not sure if that will fix your problem, but give it a try

@wodin thank you! I’ll give it a try and feedback.

1 Like

@wodin this worked! Thank you for taking the time to look, much appreciated.

1 Like

Glad I could help :slight_smile:

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