After force-restarting my computer during a build process, I can no longer create a prebuild for any of my Expo projects. Every attempt results in an integrity checksum error, which prevents Expo from creating the android folder. However, the projects still compile successfully on EAS and other devices.
The error message I’m encountering is:
sha512-QVG43XKRs6MoYo6tYbPSUbQH7Ig+a5Cxdmv48SfDIBa3ielBjbyiLJRGTd1q3SHXg7Vd9N5smlh1XDu2RyksHw== integrity checksum failed when using sha512: wanted sha512-QVG43XKRs6MoYo6tYbPSUbQH7Ig+a5Cxdmv48SfDIBa3ielBjbyiLJRGTd1q3SHXg7Vd9N5smlh1XDu2RyksHw== but got sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==. (0 bytes)
✖ Failed to create the native directories
You may want to delete the ./ios and/or ./android directories before trying again.
Steps I’ve taken to resolve the issue:
- Deleted the
/android
and/ios
folders. - Cleared the npm cache using
npm cache clean --force
- Also erased the
.expo
folder. - Ran
npx expo install --check
to fix dependencies. - Deleted
package-lock.json
andnode_modules
. - Tried using other package managers (e.g. Yarn).
- Removed both Node.js and n.
- Reinstalled Node.js version 18.20.4 using nvm.
- Set the npm registry with
npm set registry https://registry.npmjs.org/
- Ran
expo-doctor
multiple times.
The only thing I found was a some mismatched dependencies, however they are not the same across every project.
What could be causing this integrity checksum error, and how can I resolve it so that I can create a prebuild again?