Registry / devops / expo-env-info

expo-env-info

JSON →
library2.0.14jsnpmunverified

expo-env-info is a CLI tool packaged as an npm module that collects detailed environment diagnostics for Expo projects – including OS versions, Node.js, npm/yarn, Expo CLI, Android/iOS SDK versions, and system-level dependencies – to help developers and maintainers triage issues quickly on GitHub. Current stable version is 2.0.14, released as part of the Expo monorepo with monthly release cadence. Unlike generic environment reporters, it is tailored specifically to Expo's build pipeline requirements, detecting common misconfigurations like missing Java, incorrect Android SDK paths, or deprecated package managers.

npm install expo-env-info
INSTALL
IMPORT
SIG · EXPO-ENV-INFO
E
expo-env-info
devopsjavascriptv2.0.14
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

expo-env-info
npx expo-env-info
npm install -g expo-env-info
This is a CLI tool, not a library. Use npx to run without global install. If used programmatically, import the module via `const { getCurrentEnvInfo } = require('expo-env-info')` (CJS only).
getCurrentEnvInfo
const { getCurrentEnvInfo } = require('expo-env-info'); const info = await getCurrentEnvInfo();
import { getCurrentEnvInfo } from 'expo-env-info';
This package is CommonJS only and does not ship ESM. Using ESM `import` will fail. The function returns a Promise with environment data.
MAIN_SYMBOLS
The package exports `getCurrentEnvInfo` and `getDiagnosticInfo`. Both are async functions that return environment detail objects.
No named exports besides these two. `getDiagnosticInfo` provides formatted markdown suitable for GitHub issues.

Demonstrates how to programmatically collect environment diagnostics in an Expo project by calling `getCurrentEnvInfo()` and logging the result.

const { getCurrentEnvInfo } = require('expo-env-info'); getCurrentEnvInfo().then(env => { console.log('Environment:', JSON.stringify(env, null, 2)); }).catch(err => { console.error('Failed to get environment info:', err.message); });
Debug
Known issues
breakingExpo SDK 40+ requires Node.js 12+ (LTS). Older Node.js versions cause the tool to crash with obscure errors.
fix
Use Node.js 12.20.0+ or 14.13.1+ (semver range ^12.20.0 || ^14.13.1 || >=16.0.0)
affects: >=2.0.0
deprecatedThe `exp` CLI package was deprecated in favor of `expo-cli`. `expo-env-info` still references `exp` in some diagnostics and may report missing `exp` incorrectly.
fix
Install `expo-cli` instead of `exp`. The tool will adapt in future versions.
affects: >=1.0.0
gotchaRunning `expo-env-info` inside a project without Expo installed will silently omit many Expo-specific fields (like expo-cli version, Android SDK paths).
fix
Ensure an Expo project is initialized (`expo init`) before running the diagnostics to get complete output.
affects: >=2.0.0
breakingOn Windows, `expo-env-info` may not detect Android SDK paths correctly if the ANDROID_HOME environment variable is not set, causing missing fields.
fix
Set ANDROID_HOME to your Android SDK location (e.g., `C:\Users\username\AppData\Local\Android\Sdk`) in system environment variables.
affects: >=1.0.0
deprecatedThe `-h` and `--help` flags display an outdated usage message that references removed options.
fix
Use `npx expo-env-info --help` to see updated options. The output is currently being revamped.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'expo-env-info'
The package is not installed locally, but the user is trying to `require` it without using `npx` or installing it.
fix
Run `npx expo-env-info` instead of `node -e "require('expo-env-info')"`. Or install as a dev dependency: `npm install --save-dev expo-env-info`
Error: spawn java ENOENT
Java is not installed or not in PATH. The tool tries to detect Java for Android builds.
fix
Install Java JDK (8 or 11) and add it to PATH. On macOS: `brew install openjdk@11`; on Windows: download from Oracle.
Upgrade
Version history
2.0.14latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
expo-env-info — npm install expo-env-info · libregistry