I have started a new minimalist build with expo. I've added react-native-web-maps and react-native-maps and the web simulator works fine, the ios simulator works fine, but when I runnpx expo build:webI get the following error.
Failed to compile.
Module not found: Error: Can't resolve 'crypto' in '/Users/Alex/apps/liveWindApp/node_modules/expo-modules-core/build/uuid'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }
If I remove the react-native-web-maps import from my code the build works fine. I don't use crypto at all and have not added it to my project.
I was able to remove the error by updating the create-expo-app package and starting a new project following all the same steps so the issue was probably in a discrepancy in the project setup
I have started a new minimalist build with expo. I've added react-native-web-maps and react-native-maps and the web simulator works fine, the ios simulator works fine, but when I run
npx expo build:web
I get the following error.If I remove the react-native-web-maps import from my code the build works fine. I don't use crypto at all and have not added it to my project.
Package.json below