Transformer is not a constructor on a monorepo

Please provide the following:

  1. SDK Version:40
  2. Platforms(Android/iOS/web/all): ios / android

Hi !
I am in a monorepo with yarn workspace and I have, as the doc recommends, my entry point in the package.json is define like this:

"main": "__generated __ / AppEntry.js"

and it is placed here in my project :

Capture d’écran 2021-01-07 à 20.24.30

but when I start the application I have this error:

Failed building JavaScript bundle.
__generated __ / AppEntry.js: Transformer is not a constructor

there is my AppEntry.js :

import 'expo/build/Expo.fx';
import { activateKeepAwake } from 'expo-keep-awake';
import registerRootComponent from 'expo/build/launch/registerRootComponent';
import App from '../App';
if (__DEV__) {
  activateKeepAwake();
}
registerRootComponent(App);

Do you know where it could come from?

Hi! I’m also using SDK 40 in a monorepo, and got this issue solved by downgrading metro-config to 0.58, its working for now:
yarn add -D metro-config@0.58.0

1 Like

here is a working example of a monorepo setup with yarn workspaces for an expo project, running on sdk 40: examples/with-yarn-workspaces at master · expo/examples · GitHub

1 Like

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