Hi guys I'm making my first app in react-native and i got a problem while installing.
Missing package "metro-config" in the project at: C:\Users\Luc\Downloads\dashboard\ToDo APP\todoList
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-config" in the project at: C:\Users\Luc\Downloads\dashboard\ToDo APP\todoList
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 (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\metro-config\src\importMetroFromProject.ts:19:11)
at importFromProject (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\metro-config\src\importMetroFromProject.ts:25:18)
ts:29:10)
at getDefaultConfig (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\metro-config\src\ExpoMetroConfig.ts:89:23)
at Object.loadAsync (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\metro-config\src\ExpoMetroConfig.ts:268:23)
at runMetroDevServerAsync (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\dev-server\src\MetroDevServer.ts:58:45)
at startDevServerAsync (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\src\start\startDevServerAsync.ts:69:55)
at startAsync (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\src\start\startAsync.ts:74:41)
Hi guys I'm making my first app in react-native and i got a problem while installing.
Missing package "metro-config" in the project at: C:\Users\Luc\Downloads\dashboard\ToDo APP\todoList
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-config" in the project at: C:\Users\Luc\Downloads\dashboard\ToDo APP\todoList
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 (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\metro-config\src\importMetroFromProject.ts:19:11)
at importFromProject (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\metro-config\src\importMetroFromProject.ts:25:18)
ts:29:10)
at getDefaultConfig (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\metro-config\src\ExpoMetroConfig.ts:89:23)
at Object.loadAsync (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\metro-config\src\ExpoMetroConfig.ts:268:23)
at runMetroDevServerAsync (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\dev-server\src\MetroDevServer.ts:58:45)
at startDevServerAsync (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\src\start\startDevServerAsync.ts:69:55)
at startAsync (C:\Users\Luc\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\src\start\startAsync.ts:74:41)
Share
Improve this question
asked Oct 23, 2021 at 18:35
Lucian HorvatLucian Horvat
431 gold badge1 silver badge5 bronze badges
2
-
1
could you run
npm list
in your project directory and see ifreact-native
is in there ? – Coffeeholic Commented Oct 23, 2021 at 18:45 - hey, i needed to install react native lmao. – Lucian Horvat Commented Oct 23, 2021 at 21:39
2 Answers
Reset to default 2I think you have forked or copied the code from somewhere and trying to learn how things work.I js projects we may have a lot of dependencies and that dependencies also may some dependencies thus the modules we require would be huge enough.While we are storing our code or sharing our code,we basically ignore the node_modules folder and when you are running the app .At first you should install all the required modules.
npm install
if you are using npm as your package manager
yarn install
if you are using yarn as your package manager
Either of these mands will install the required modules for your project and then try to run it.happy coding!!!
Try
npm install
yarn install
if it's your first project. I think you may get started with expo-cli. It is similar to react-native CLI with a simple workflow.
But I reend you to re-install/re-follow doc steps.
Check this out
https://reactnative.dev/docs/environment-setup
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744232735a4564331.html
评论列表(0条)