Home > Enterprise >  Android Bundling failed in expo-cli when we run "npm start" or scan expo app in mobile
Android Bundling failed in expo-cli when we run "npm start" or scan expo app in mobile

Time:06-23

    ERROR
00:46
Building JavaScript bundle: error
ERROR
00:46
Unable to resolve module expo-constants from C:\Users\HP\Desktop\React Native\HelloApp\node_modules\expo-asset\build\LocalAssets.js: expo-constants could not be found within the project or in these directories:
  node_modules
> 1 | import Constants from 'expo-constants';
    |                        ^
  2 | import * as FileSystem from 'expo-file-system';
  3 | import { getLocalAssets } from './PlatformUtils';
  4 | // Fast lookup check if assets are available in the local bundle in managed apps

CodePudding user response:

Is it safe to assume you have run: expo install expo-constants?

If not, do that, and rebuild.

If this is not solving your error try:

  • Deleting package-lock and node modules
  • rerun npm install

If neither of the above solutions work, please provide more information.

Edit: Constants documentation.

  • Related