Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unable to resolve module: none of these files exist: [path]/AppEntry" #2796

Open
0-CAT opened this issue Oct 5, 2024 · 2 comments
Open
Labels

Comments

@0-CAT
Copy link

0-CAT commented Oct 5, 2024

Describe the bug

I am starting a fresh React Native project based on the documentation here and here.

In an existing repository using PNPM & Turbo, I created a new project in [root]/apps/client using npx ignite-cli@latest new [PROJECTNAME] using bare React Native. All of the setup worked without errors.

When I run pnpm ios, it seems to work; there are no errors in my terminal window. However, I get an error in the emulator itself (shown in the first image below) stating "Unable to resolve module" and telling me that "None of these files exist" when looking for [PROJECT_ROOT]/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]_/node_modules/expo. However, I checked, and this file does exist (shown in the second image below).

It looks like #2334 had a similar issue in the past and said that PNPM might be the issue. However, I'm stuck with PNPM as this has to integrate into an existing repository so that we can reuse some internal data contract & business logic packages. Is this a bug with Ignite's handling of PNPM-based repositories?

Images

CleanShot 2024-10-05 at 16 10 03

CleanShot 2024-10-05 at 16 11 32

Ignite version

9.10.1

Additional info

It looks like there's an issue running this command when you're using PNPM as the package manager. The below output is all I get (worth noting that I have "packageManager": "[email protected]" in my root-level package.json):

System
  platform           darwin
  arch               arm64
  cpu                10 cores     Apple M2 Pro
  directory          client       /Users/[USERNAME]/Code/[PROJECTNAME]/apps/client

/Users/[USERNAME]/.npm/_npx/e31027f3785124a8/node_modules/gluegun/build/index.js:15
    throw up;
    ^
error This project's package.json defines "packageManager": "yarn@[email protected]". However the current global version of Yarn is 1.22.22.
@0-CAT 0-CAT added the bug label Oct 5, 2024
@frankcalise
Copy link
Contributor

frankcalise commented Oct 6, 2024

Hi @0-CAT - there are already open issues where we are trying to document proper monorepo set up such as #1981 #2715

You can view the in-progress documentation here: infinitered/ignite-cookbook#173 - although it doesn't specifically address pnpm at this time, but maybe there is some information that could help unblock you and you could add to it.

However, it looks as if your packageManager field inside of package.json is invalid. It should either be [email protected] or [email protected] but not have both concatenated together as far as I know.

(edit: disregard this above, I saw your note about that point)

If you could provide a minimal repository that reproduces the issue, would be happy to look at it further.

@0-CAT
Copy link
Author

0-CAT commented Oct 6, 2024

Thanks for the tips! Taking a look at those docs today.

I think I've unblocked myself for now by using the @rnx packages which have symlink resolvers—but unfortunately doing so required going with a different boilerplate than Ignite 😔. That said, if I get a moment I will definitely try and throw together a minimal repro!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants