ignite icon indicating copy to clipboard operation
ignite copied to clipboard

Missing dependency: metro-config

Open kevinvangelder opened this issue 3 years ago • 4 comments

What's going on?

metro-config dependency is missing. Manually installing it resolves this issue.


Steps to reproduce

  1. Generate a new project
  2. Attempt to run the project with react-native start or npm run start
  3. Observe error:
$ npm run start

> [email protected] start /Users/kvg/Code/apps/appname
> react-native start

warn Package expo-modules-core has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios" must be of type object
error Cannot find module 'metro-config'
Require stack:
- /Users/kvg/Code/apps/appname/metro.config.js
...

npx ignite-cli doctor results:

System
  platform           darwin
  arch               x64
  cpu                16 cores            Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  directory          appname   /Users/kvg/Code/apps/appname

JavaScript (and globally-installed packages)
  node                    14.15.5                                   /usr/local/bin/node
  npm                     6.14.11                                   /usr/local/bin/npm
    corepack              0.10.0
    npm                   8.7.0
  yarn                    1.22.15                                   /usr/local/bin/yarn
    expo-cli              4.3.4
    mobile-commander      0.1.1
    prettier-eslint-cli   5.0.1
    react-devtools        3.6.3
    react-native-cli      2.0.1
    ts-node               10.4.0
    typescript            4.5.4
  pnpm                    6.11.0                                    /usr/local/bin/pnpm
                          <no pnpm global package info available>

Ignite
  ignite-cli         7.10.9       /Users/kvg/.npm/_npx/475/bin/ignite
  ignite src         build        /Users/kvg/.npm/_npx/475/lib/node_modules/ignite-cli/build

Android
  java               11.0.6       /usr/bin/java
  android home       -            /Users/kvg/Library/Android/sdk

iOS
  xcode              13.3
  cocoapods          1.11.3       /Users/kvg/.gem/ruby/2.6.3/bin/pod

kevinvangelder avatar Apr 23 '22 21:04 kevinvangelder

someone help me. image

tranduy1401384 avatar Apr 25 '22 08:04 tranduy1401384

Me too!

brhoomjs avatar May 03 '22 21:05 brhoomjs

Manually installing metro-config resolved my issue. Give that a shot if you haven't already.

kevinvangelder avatar May 05 '22 19:05 kevinvangelder

@kevinvangelder Is this still an issue in the current version of ignite?

frankcalise avatar Aug 10 '22 13:08 frankcalise

There has been a lot of changes since this issue last had activity. We have release a new major version of Ignite, codenamed Maverick. This is going to be closed for now, but please re-open if this still needs attention.

joshuayoes avatar Oct 04 '22 18:10 joshuayoes

i use the latest version, it still happen when i use "pnpm i" to install dependencies, ios is fine, but it will show "Cannot find module '@expo/metro-config'"

quarksb avatar Jun 18 '23 16:06 quarksb

:tada: This issue has been resolved in version 8.8.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

infinitered-circleci avatar Jun 29 '23 15:06 infinitered-circleci