Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6290

Expo: Cannot resolve entry file: The `main` field defined in your `package.json` points to a non-existent path

$
0
0

I am working with the default typescript template generated from the command line npx create-expo-app -t expo-template-blank-typescript and I get this error when I try to start the project.

The main reason I think, is because I am working in a monorepo.

The entry point in package.json points to "main": "node_modules/expo/AppEntry.js" but in a monorepo, the expo module is only present in the parent node_modules folder.

What I have tried

I have tried setting up the entry point in app.json to: ./src/App.tsx, ./dist/App.js with no success

When I change the main field of package.json to ../../node_modules/expo/AppEntry.ts

Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11)

My setup

I am working with turborepo. My folder structure look like

├── app│├──project1││├── package.json││├── App.tsx││├── app.json││└── tsconfig.json│└──node_modules└── node_modules└── expo└── AppEntry.js

Is there a clean way to handle this scenario ?


Viewing all articles
Browse latest Browse all 6290

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>