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
Asked
Active
Viewed 3,162 times
1

Sarfaraz Raza Qadri
- 21
- 2
- 4
2 Answers
1
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.

Corey Sutton
- 767
- 5
- 19
-
Deleting package-lock and node modules rerun "npm install" – Sarfaraz Raza Qadri Jun 22 '22 at 19:53
0
I also had a bundling fail situation. My node js version was 14.o, I upgraded it to the newest version, mine was 18.0. Then it worked fine.

Nalin Athukorala
- 111
- 2
- 4