Comments (10)
Ya, the name
in the root package.json
cannot be expo-router
or any other node module name in the project. The root package.json takes priority over any other package installed in the node modules folder. After you're unblocked by that app/index.tsx
will collide with app/(tab)/index.tsx
as they both resolve to /
.
from router.
Are you guys sure you did not forget to follow this step ?
https://expo.github.io/router/docs/intro#configure-the-babel-plugin
I accidentally forgot about it and had the same error
And do not forget to start project with npx expo start --clear
from router.
Can you try npx expo start --clear ?
from router.
Same thing :(
error: Error: While resolving module `expo-router/entry`, the Haste package `expo-router` was found. However the module `entry` could not be found within the package. Indeed, none of these files exist:
* `/Users/jclackett/Apps/Examples/expo-router/entry(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)`
from router.
you can try it out on my branch :)
https://github.com/Albert-Gao/expo-router-web-try-out/tree/web-auth-flow
might need to swap the wrapper in the layout component to nativeStack for mobile, but you can just clean the app folder and start from fresh :)
from router.
What may be the work around ?!
from router.
Definitely have this!
from router.
Ensure the following:
- Using
"expo": "~46.0.13"
or greater. - The file
node_modules/expo-router/entry.js
exists. - You are starting your project with Expo CLI (npx expo start). React Native CLI won't work.
Workaround
- Try creating a file
index.js
which hasimport 'expo-router/entry'
. Then set"main": "./index"
in yourpackage.json
.
from router.
Yeah weird, I definitely have all of those things!
The entry file is definitely in my node_modules so I don't understand how it can't find it
Still just getting:
error: Error: While resolving module `expo-router/entry`, the Haste package `expo-router` was found. However the module `entry` could not be found within the package. Indeed, none of these files exist:
* `/Users/jclackett/Apps/Examples/expo-router/entry(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)`
It is trying to find the entry file in the root directory though...is that right? I think it might be something to do with metro? if I force it to load from node_modules:
import "./node_modules/expo-router/entry";
I then get:
error: Error: While resolving module `expo-router/build/splash`, the Haste package `expo-router` was found. However the module `build/splash` could not be found within the package. Indeed, none of these files exist:
But I honestly have no idea how any of this stuff works...
from router.
Here's the repo I'm using: https://github.com/JClackett/expo-router
from router.
Related Issues (20)
- why is the dev server generating .gitignore HOT 1
- eas update fails with web: {...output: static,...} HOT 1
- Navigation Stack Issue with Incorrect Event Display HOT 1
- _layout inside a (tabs) folder throws error in navigation and gives me a blank screen HOT 5
- Bad start-up navigation with expo prebuild HOT 4
- Navigation twice on the first screen of a modal (only in production app) HOT 6
- Migration to expo-router-v2 breaks onLayout redirect HOT 2
- Template tabs@48 is broken HOT 3
- Metro has encountered an error: While trying to resolve module `stylis` HOT 2
- Expo Router V2 breaks when calling hook on destination page HOT 5
- Expo Router V2 Web - ScrollView in nested navigation is not showing up HOT 5
- Unable to nested dynamic route under shared HOT 5
- listeners prop do not have types
- Metro has encountered an error: While trying to resolve module stylis HOT 3
- TypeError: (0 , _stylis.middleware) is not a function HOT 4
- Navigation between screens in different tabs does not work HOT 7
- Impossible to change router background in dark theme HOT 3
- Push notifications do not work when received. HOT 1
- Not able to pick initialRouteName in Expo Router when using stacked navigation HOT 2
- useFocusEffect cleanup - This expression is not callable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from router.