infinitered / ignite

Infinite Red's battle-tested React Native project boilerplate, along with a CLI, component/model generators, and more! 9 years of continuous development and counting.
MIT License
17.79k stars 1.41k forks source link

Error: Unable to resolve module ./node_modules\expo\AppEntry #2334

Closed a0v0 closed 1 year ago

a0v0 commented 1 year ago

Describe the bug

I created a boilerplate using npx ignite-cli@latest new FaneApp

But on running the command pnpm expo:start and than pressing a to run on android I get the below error.

Error: Unable to resolve module ./node_modules\expo\AppEntry from E:\Projects\FaneApp/.: 

None of these files exist:
  * node_modules\expo\AppEntry(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
  * node_modules\expo\AppEntry\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)

...

I also tried adding line below in app.json but still gets the same error.

"packagerOpts": {
    "sourceExts": ["js", "json", "ts", "tsx", "jsx", "vue"],
    "config": "metro.config.js"
  }

Ignite version

8.4.2

Additional info

System
  platform           win32
  arch               x64
  cpu                8 cores      Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz
  directory          FaneApp      E:\Projects\FaneApp

JavaScript (and globally-installed packages)
  node                       19.2.0                                                                            C:\Users\Administrator\scoop\apps\nodejs\current\node.EXE
  npm                        8.19.3                                                                            C:\Users\Administrator\scoop\apps\nodejs\current\npm.CMD
    @wundergraph/wunderctl   0.114.2                                                                                     

    gitmoji-changelog        2.3.0                                                                                       

  yarn                       -                                                                                 not installed
  pnpm                       7.18.1                                                                            C:\Users\Administrator\scoop\shims\pnpm.EXE
                             <no pnpm global package info available>                                                     

  expo                       47.0.8 -> .\node_modules\.pnpm\expo@47.0.8_@babel+core@7.20.5\node_modules\expo   managed   

Ignite
  ignite-cli         8.4.2        C:\Users\Administrator\scoop\persist\nodejs\cache\_npx\e31027f3785124a8\node_modules\.bin\ignite.CMD
  ignite src         build        C:\Users\Administrator\scoop\persist\nodejs\cache\_npx\e31027f3785124a8\node_modules\ignite-cli\build

Android
  java               1.8.0_352    C:\Users\Administrator\scoop\apps\temurin8-jdk\current\bin\java.EXE
  android home       -            C:\Users\Administrator\scoop\apps\android-sdk\current

Tools
  git                git version 2.38.1.windows.1   C:\Users\Administrator\scoop\shims\git.EXE 
vagnerlandio commented 1 year ago

I got the same problem when trying to use pnpm as a package manager. Using npm or yarn I didn't have any problem.