expo-cli
expo-cli copied to clipboard
Latest expo introduces a regression of #843
Summary
This seems to be a direct reproduction of this: https://github.com/expo/expo-cli/issues/843
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 12.5
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.1/bin/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
Managers:
CocoaPods: 1.11.3 - /Users/cody/.rvm/gems/ruby-3.0.2/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7935034
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
npmPackages:
@expo/webpack-config: ~0.16.2 => 0.16.27
expo: ^46.0.0 => 46.0.7
react: 18.0.0 => 18.0.0
react-dom: 18.0.0 => 18.0.0
react-native: 0.69.4 => 0.69.4
react-native-web: ~0.18.7 => 0.18.7
npmGlobalPackages:
eas-cli: 0.60.0
expo-cli: 6.0.2
Expo Workflow: managed
Please specify your device/emulator/simulator platform, model and version
web
Error output
Uncaught TypeError: Cannot read properties of undefined (reading 'call')
at l (bootstrap:79:22)
at Module.<anonymous> (index.tsx:1:1)
at l (bootstrap:79:22)
at 1009 (app.4078bec3.chunk.js:1:235)
at l (bootstrap:79:22)
at Module.<anonymous> (2.5324c574.chunk.js:2:6358367)
at l (bootstrap:79:22)
at 1037 (app.4078bec3.chunk.js:1:751434)
at l (bootstrap:79:22)
at t (bootstrap:45:15)
Reproducible demo or steps to reproduce from a blank project
This started occurring after upgrading.
yarn start:web
works fine, but when building with
yarn export:web
we get the error above.
Rolling back @expo/webpack-config
to ~0.16.2
from ^0.17.0
works around the issue and allows us to successfully run yarn export:web
again.
For completeness sake, here is our webpack config:
const createExpoWebpackConfigAsync = require("@expo/webpack-config");
const { ExpoInterpolateHtmlPlugin } = require("@expo/webpack-config/plugins");
const { getPluginsByName } = require("@expo/webpack-config/utils");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = async function (env, argv) {
// const config = await createExpoWebpackConfigAsync(env, argv);
const config = await createExpoWebpackConfigAsync(
{
...env,
// offline: true,
babel: {
dangerouslyAddModulePathsToTranspile: ["@gorhom/bottom-sheet"],
},
},
argv
);
const [plugin] = getPluginsByName(config, "HtmlWebpackPlugin");
if (plugin) {
const { options } = plugin.plugin;
const newExpoInterpolateHtmlPlugin = ExpoInterpolateHtmlPlugin.fromEnv(
env,
HtmlWebpackPlugin
);
newExpoInterpolateHtmlPlugin.replacements = {
...newExpoInterpolateHtmlPlugin.replacements,
STAGE: process.env.STAGE,
};
config.plugins.splice(plugin.index, 1, new HtmlWebpackPlugin(options));
config.plugins.splice(plugin.index + 1, 1, newExpoInterpolateHtmlPlugin);
}
return config;
};
However, the error persisted even when using the default webpack file
I am having the same issue after upgrading expo-cli to 6.0.2
Just wanted to note, I had the same problem with an expo app deployed via AWS Amplify CI. I pinned the expo-cli version installed in the prebuild phase to 5.6.0 to work around it for now.
@justro , thank you, it works for me also until we have a fix. best
I was on expo-cli 6.0.5 and this is still happening. I downgraded to 5.6.0 as @justro suggested and it works.
Having the same issue! For me downgrading expo-cli not working but downgrading @expo/webpack-config does
same here!
Yeah, downgrading to "@expo/webpack-config": "0.16.27"
worked for me.
Is it fixed already?
This is affecting my team as well. Downgrading @expo/webpack-config is a workaround for now.
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.