React native shows an error message stating that expo cannot be located within the project

Currently undertaking a React Native project as part of my studies in collaboration with group members. One of my group mates, who developed the project, is able to run it without any issues. However, despite having expo installed globally, I am encountering difficulties when attempting to run the program:

Unable to find expo in this project - have you executed yarn / npm install yet?
        ├─ action C:\Users\thoma\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:34:11
        ├─ C:\Users\thoma\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:135:22
        └─ expo start C:\Users\thoma\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:350:7
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! @ start: `expo start`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the @ start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm WARN Local package.json exists, but node_modules missing, did you mean to install?
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\thoma\AppData\Roaming\npm-cache\_logs\2021-06-07T11_27_47_082Z-debug.log

Seeking guidance on possible solutions to rectify this issue.

Answer №1

To get your project up and running, execute the following command:

yarn

Essentially, your partner has added some dependencies and committed their code. When you fetch the code, you'll need to install those dependencies into your project, hence why running the above command is necessary.

Alternatively, depending on your system configurations, you can also use npm install.

Answer №2

The reason for this issue is that you are currently not located within your designated project directory.
To resolve this, execute the following command:

expo start

Ensure to run this command inside your project folder.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

NPM IP library susceptible to Server-Side Request Forgery (SSRF) vulnerabilities

Received Security Alert from GitHub's Dependabot Regarding an Issue in My Angular Repository A security vulnerability has been identified in all versions of the NPM package "ip," allowing a malicious actor to execute arbitrary code and access sensiti ...

Steps to enable multiple users to log in through a single route

I've developed a login code for managing two different schemas - User and Admin. Currently, I have separate login routes: /login for normal users and super admins, and /adminLogin for admin users and super admins. My goal is to merge these two schema ...

Can you provide guidance on securing a REST API using Google authentication?

I'm currently working on developing a REST API using NodeJS and Passport for a single-page JavaScript application. I am struggling to find the right approach to securing my REST API with Google OAuth. Can someone guide me on how to achieve this? Any ...

Problem: values.map is not a function (What causes this error to occur?)

I have a task to fetch details from the database using an ID and display them in a table. However, initially, I just want to display them on the browser without any formatting. When I try to do this, I encounter an error message saying 'values.map is ...

What steps can be taken to successfully execute a Nodejs project when encountering an error message such as "Unresponsive script"?

When I try to run my Nodejs project, I encounter an error message stating "Unresponsive script". I came across a project on GitHub called angularjs-rickshaw. This project is built on Nodejs and bower. Project: ngyewch/angular-rickshaw Demo of the projec ...

Delivering VueJS Builds via Express.js by leveraging history mode

I am trying to find a way to serve vue js dist/ through express js while using the history router in my vue js app. Here are some of the API calls I need: api/ s-file/sending/:id terms/get/:which I came across a Python solution on Github, but I'm ...

Express and Mongoose Server Crash resulted in an ERR_HTTP_HEADERS_SENT issue

Currently, I am developing a user authentication backend using express and mongoose. My main focus right now is enabling users to update their name and email address. To achieve this, I am implementing a system where the email input is cross-checked with ...

Sequelize encountered an error: Unhandled promise rejection of type TypeError: Unable to access property '_pseudo of undefined'

After cloning this app from https://github.com/sequelize/express-example, I noticed that it is the official sequelize express example. However, upon attempting to run it, I encountered the following error: Unhandled rejection TypeError: Cannot read proper ...

Issue with installing the latest React version alongside MUI version 5 on NodeJS 20.9.0: experiencing difficulty in compatibility

Encountering problem getting the latest mui version with the most recent react on node 20.9.0 These are the steps I took: Ran npx create-react-app my-project Navigated to my-project directory using cd command Installed @mui/material, @emotion/react, and ...

How to access a static TypeScript variable in Node.js across different files

I encountered a situation like this while working on a node.js project: code-example.ts export class CodeExample { private static example: string = 'hello'; public static initialize() { CodeExample.example = 'modified'; } ...

Experiencing a compatibility issue in React while attempting to integrate Material-UI (MUI

Working on a react project, I decided to incorporate MUI and MUI icons by using npm install @mui/material and npm install @mui/icons-material. After importing the SearchIcon, however, an error message appears on my react page: ./node_modules/@mui/styled- ...

Developing a transparent "cutout" within a colored container using CSS in React Native (Layout design for a QR code scanner)

I'm currently utilizing react-native-camera for QR scanning, which is functioning properly. However, I want to implement a white screen with opacity above the camera, with a blank square in the middle to indicate where the user should scan the QR code ...

Access to NodeJs localhost:5000 is not successful

Running npm run dev command Issue with accessing localhost - stuck spinning Code snippet: Mycode ...

Is your Node.js asynchronous parallel function not performing as expected?

I have a series of promises that I need to execute sequentially, but it's getting messy with all the promise returns. To simplify this process, I decided to use the async library and tried out the parallel method. However, instead of running one after ...

Adding items to the array is only effective when done within the loop

My approach involves retrieving data from an API using axios, organizing it within a function named "RefractorData()," and then pushing it onto an existing array. However, I have encountered a problem where the array gets populated within a forEach loop, a ...

Dockerhub build process encountering errors with npm install bcrypt causing automated build to fail

I have a Dockerfile setup as follows: FROM ubuntu:14.04 MAINTAINER John Doe <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4d28202c24210d20342c3d3d632e2220">[email protected]</a>> ENV NODE_ENV production ...

What is causing the issue preventing me from running npm run dev on CentOS 7?

Currently facing an issue while trying to install my application on a new server after migrating from centos6 to centos7. When attempting to install a Laravel app, everything goes smoothly as it did on centos6, except for when I run npm run dev [root@v6-a ...

Converting nested arrays within a JSON object to a CSV format

I am currently utilizing the 'json-csv' library to convert a user's arrays with nested objects and arrays into a CSV format. var users = [ { subscriptions: [ { package : { name: &a ...

When running the `mocha` command with `npm test`, no specific

Could use some help: I've encountered an issue while running a unit-testing command. The error messages are not being printed when there are errors, making debugging quite challenging. Here is the command I executed: and here's the package.json ...

Preventing the creation of several Sequelize class instances

As I work on constructing a basic database schema using Express and Sequelize, I've organized my models in separate files. In a central file called models/index.js, I initialize an instance of the Sequelize class, import the models, and define relatio ...