Cannot determine which native SDK version your project uses because the module `expo` is not installed.

I am new to React-Native and Expo. I’m following the manual: Setting up the development environment · React Native. In particular, I executed the following commands:

npm install -g expo-cli
yarn global add expo-cli
expo init AwesomeProject
cd AwesomeProject

but get error when trying expo start:

Cannot determine which native SDK version your project uses because the module `expo` is not installed. Please install it with `yarn add expo` and try again.
    ├─ getExpoSDKVersion /Users/andrewshevtsov/.config/yarn/global/node_modules/@expo/config/src/Project.ts:23:9
    ├─ ensureConfigHasDefaultValues /Users/andrewshevtsov/.config/yarn/global/node_modules/@expo/config/src/Config.ts:491:18
    ├─ fillAndReturnConfig /Users/andrewshevtsov/.config/yarn/global/node_modules/@expo/config/src/Config.ts:109:10
    ├─ getConfig /Users/andrewshevtsov/.config/yarn/global/node_modules/@expo/config/src/Config.ts:180:10
    ├─ upgradeAsync /Users/andrewshevtsov/.config/yarn/global/node_modules/expo-cli/src/commands/upgrade.ts:449:30
    ├─ /Users/andrewshevtsov/.config/yarn/global/node_modules/expo-cli/src/commands/upgrade.ts:860:7
    └─ expo upgrade /Users/andrewshevtsov/.config/yarn/global/node_modules/expo-cli/src/exp.ts:346:7

expo diagnostics output:

Expo CLI 4.0.17 environment info:
System:
OS: macOS 11.1
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.19.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.0. - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 23, 25, 26, 27, 28, 29, 30
Build Tools: 23.0.3, 25.0.3, 26.0.2, 27.0.3, 28.0.3, 29.0.2
System Images: android-22 | Google APIs Intel x86 Atom_64, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom
IDEs:
Xcode: 12.3/12C33 - /usr/bin/xcodebuild
npmPackages:
react: 16.13.1 => 16.13.1
react-native: 0.63.4 => 0.63.4
npmGlobalPackages:
expo-cli: 4.0.17
Expo Workflow: bare

What am I doing wrong???

hi!

after expo init ... , you should be presented with

? Choose a template: › - Use arrow-keys. Return to submit.
    ----- Managed workflow -----
❯   blank                 a minimal app as clean as an empty canvas
    blank (TypeScript)    same as blank but with TypeScript configuration
    tabs (TypeScript)     several example screens and tabs using react-navigation and TypeScript
    ----- Bare workflow -----
    minimal               bare and minimal, just the essentials to get you started
    minimal (TypeScript)  same as minimal but with TypeScript configuration

Which one are you picking? I think that all of them have "expo": "~40.0.0", in package.json, could you double-check that in your project?

Sorry, I created the project with npx react-native init AwesomeProject
That’s why expo start didn’t work. I wasn’t aware that these commands create different projects.

2 Likes

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