Expo SDK: 41
react-native-web version: 0.17.1
I’m having a problem building my project for web. Seems to be a problem with React Native, as a relative import in the react-native node module is failing. my .babelrc
is:
{
"plugins": [
[
"module-resolver",
{
"root": [
"./"
],
"alias": {
"components": "./src/components",
"networking": "./src/networking",
"style": "./src/style",
"types": "./src/types",
"app": "./src",
"theme": "./src/Theme"
}
}
]
]
}
My webpack config is:
const expoConfig = require('@expo/webpack-config');
const path = require('path');
module.exports = async function(env, argv) {
const config = await expoConfig(env, argv);
config.resolve = {
alias: {
"components": path.resolve(__dirname, "src/components"),
"networking": path.resolve(__dirname, "src/networking"),
"style": path.resolve(__dirname, "src/style"),
"types": path.resolve(__dirname, "src/types"),
"app": "./src",
"theme": path.resolve(__dirname, "src/Theme")
}
};
return config;
}
And the full error is:
Failed to compile.
/Users/x/Desktop/x/node_modules/react-native/Libraries/Image/AssetSourceResolver.js
Module not found: Can't resolve '../Utilities/Platform' in 'project/path/node_modules/react-native/Libraries/Image'
No idea what to do here, other than downgrade my expo SDK and hope it works. The weird thing is, I’m not even using an Image
anywhere in my app