I’m developing an app for web and mobile so I’m using expo where if I run the app for android it works fine but when I want to run for web using yarn run web it showing an error.
Failed to compile.
/usr/local/lib/node_modules/expo-cli/node_modules/react-error-overlay/lib/index.js
Line 1: ‘define’ is not defined no-undef
Line 1: ‘define’ is not defined no-undef
Line 1: ‘regeneratorRuntime’ is not defined no-undef
I already installed and configured eslint-config-universe.and also tried with below config
Until this is fixed (looks like soon), you can either jump back to an older version of the cli npm install --global expo-cli@2.21.2 / yarn global add expo-cli@2.21.2 or try this workaround that worked for me (copying from my github comment because GH seemed to be down for a bit):
You can work around this issue by running expo customize:web , selecting webpack, then overriding the webpack-config version to one before the eslit config was added:
yarn add -D @expo/webpack-config@0.5.19
Alternatively, run the yarn / npm command above and create a webpack.config.js file in the root of your project with the following content:
const createExpoWebpackConfigAsync = require('@expo/webpack-config');
module.exports = async function(env, argv) {
const config = await createExpoWebpackConfigAsync(env, argv);
// Customize the config before returning it.
return config;
};