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

Missing package "metro" in the project... #4

Open
w8r opened this issue Dec 21, 2021 · 1 comment
Open

Missing package "metro" in the project... #4

w8r opened this issue Dec 21, 2021 · 1 comment

Comments

@w8r
Copy link

w8r commented Dec 21, 2021

I checked out the project and tried to run it, to no avail:

% yarn start
Starting project at /Users/***/Projects/react-native-animated-todo
Developer tools running on http://localhost:19002
Opening developer tools in the browser...
Some dependencies are incompatible with the installed expo package version:
 - react-native-reanimated - expected version: ~2.2.0 - actual version installed: 2.3.1
 - react-native-screens - expected version: ~3.8.0 - actual version installed: 3.10.1
 - react-native-svg - expected version: 12.1.1 - actual version installed: 12.2.0
Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo install [package-name ...]
Missing package "metro" in the project at: /Users/***/Projects/react-native-animated-todo
This usually means `react-native` is not installed. Please verify that dependencies in package.json include "react-native" and run `yarn` or `npm install`.
Error: Missing package "metro" in the project at: /Users/***/Projects/react-native-animated-todo
This usually means `react-native` is not installed. Please verify that dependencies in package.json include "react-native" and run `yarn` or `npm install`.
    at resolveFromProject (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/dev-server/src/metro/importMetroFromProject.ts:21:11)
    at importFromProject (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/dev-server/src/metro/importMetroFromProject.ts:27:18)
    at Object.importMetroFromProject (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/dev-server/src/metro/importMetroFromProject.ts:41:10)
    at runMetroDevServerAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/dev-server/src/MetroDevServer.ts:80:17)
    at startDevServerAsync (/usr/local/lib/node_modules/expo-cli/node_modules/xdl/src/start/startDevServerAsync.ts:77:55)
    at startAsync (/usr/local/lib/node_modules/expo-cli/node_modules/xdl/src/start/startAsync.ts:73:41)
% npm -v
8.1.2
% node -v
v16.13.1
% expo --version
5.0.1
@feni-brian
Copy link

From the above output, it seems that there are version mismatches for some packages, and the "metro" package seems to be missing, which could be related to the installation of "react-native".
Do you have react-native installed globally like this npm install -g react-native-cli. If so, then go ahead and initialise it in your app’s directory like this react-native init .. Try this and see if it works. Hope I’m not late here...

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

No branches or pull requests

2 participants