expo install giving error

I am upgrading expo to v33 and as the modules have to be imported from individual
package, I am trying expo install <package_name> but facing the error Can't read JSON file: /<code path>/install/package.json cause Cause: Error: ENOENT: no such file or directory, open '/<code path>/install/package.json'
We are using yarn to install dependencies.

Hi! Sorry you’re having trouble with this

What version of expo cli are you using? And which Expo packages are you trying to install?

I want to install LinearGradient. and I am on version 3.0.6 of expo-cli
Looks like its trying to find app.json and package.json in install folder of expo while its not there but instead in the project root. so i don’t know how to install the packages using these from the root.

Are you running the command from the root directory of your project? I just tried this and was able to expo install expo-linear-gradient with no errors

Yes I am running it from the root where my package.json and app.json are present. but its still giving the error
expo install expo-linear-gradient
Expo DevTools is running at http://localhost:19003
Can't read JSON file: <project path>/install/app.json

└─ Cause: Error: ENOENT: no such file or directory, open '<project path>/install/app.json'
No Expo configuration found. Are you sure this is a project directory?
error Command failed with exit code 1.

No Expo configuration found. Are you sure this is a project directory?
error Command failed with exit code 1.

Is this a managed Expo project? Made similar to this walkthrough?

The app was created with CRNA (create-react-native-app) and Expo’s managed workflow

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.