0

I installed expo cli using

npm install -g expo-cli

then I created project named AwesomeProject as mentioned in docs and moved to that folder

expo init AwesomeProject cd AwesomeProject

But when I try to run it using npm start or expo start, I am getting this error and I don't see any output

npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Users\Home\Documents\react-native\AwesomeProject\package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\Home\Documents\react-native\AwesomeProject\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Home\AppData\Roaming\npm-cache_logs\2021-03-08T07_02_20_464Z-debug.log

2 Answers 2

0

npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Users\Home\Documents\react-native\AwesomeProject\package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\Home\Documents\react-native\AwesomeProject\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Home\AppData\Roaming\npm-cache_logs\2021-03-08T07_02_20_464Z-debug.log

Check the bold line. It tells you that you are not in the directory which contains the package.json file.

It is because you have done

npm install & npm start

from not inside the project directory, to solve this issue. first do:

cd AwesomeProject

then:

npm install

npm start

I hope this will solve your issue.

0

Change:

expo init AwesomeProject cd AwesomeProject

to

expo init AwesomeProject AwesomeProject

Then:

cd AwesomeProject

and:

expo start

You are giving two names to your project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.