Giter Site home page Giter Site logo

Comments (10)

EvanBacon avatar EvanBacon commented on May 4, 2024 5

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.

fristyr avatar fristyr commented on May 4, 2024 1

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.

fristyr avatar fristyr commented on May 4, 2024

Can you try npx expo start --clear ?

from router.

JClackett avatar JClackett commented on May 4, 2024

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.

Albert-Gao avatar Albert-Gao commented on May 4, 2024

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.

agrittiwari avatar agrittiwari commented on May 4, 2024

image
What may be the work around ?!

from router.

JClackett avatar JClackett commented on May 4, 2024

Definitely have this!

from router.

EvanBacon avatar EvanBacon commented on May 4, 2024

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 has import 'expo-router/entry'. Then set "main": "./index" in your package.json.

from router.

JClackett avatar JClackett commented on May 4, 2024

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

Screenshot 2022-10-01 at 12 28 28

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.

JClackett avatar JClackett commented on May 4, 2024

Here's the repo I'm using: https://github.com/JClackett/expo-router

from router.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.