-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expo-cli@6.2.x breaks legacy build:web
#12
Comments
We just woke up to this issue as well. Our end-to-end tests were failing in CI because we need to start the web server without user interaction. We used to have: yarn global add expo-cli
expo start:web --port $WEB_PORT and changed it to pin the version for now, which fixed things for now. yarn global add expo-cli@6.1.0
expo start:web --port $WEB_PORT We tried to switch to using the expo-cli shipped with expo (we're on Expo 47), but |
I also found that
I will further add that running Rolling back to For reference, I am using Expo SDK When I use
|
This appears to be a result of the recent migration to Webpack 5, this bug won't automatically effect projects that migrated to the new versioned Expo CLI as it requires you to choose the version of Webpack that is used. To address this issue in the global CLI, we deprecated in favor of the versioned CLI. You can work around the issue by installing I cannot reproduce the build failing in a new project so I'm going to need a reproducible example in order to fix the issue. I also ask any potential commenters to be sure that their issue is related to the original post, otherwise open a new issue. |
@Jackman3005 your comment seems unrelated to the original issue, will respond here but the thread may get a little confusing. It's unclear why you're using the following:
You can do: Further, if you'd like to open a PR to expo/expo which adds |
Thanks for the response here!
Just a warning to others here that unless expo/expo-cli#4517 has been fixed (had not as of 0.17.2 and bug is still open), this recommendation will break all prod builds of React Native Web. This caused a production outage for us a few weeks ago. As to repro: we are using a basic managed expo project and have an extended webpack-config.js using webpack 4 syntax, so that probably explains it. Here's a truncated version
|
@EvanBacon thanks for the response! you and your team at Expo rock! I'm a bit confused by the distinction between the "global CLI" and the "versioned CLI", which you say is preferred. could you please refer me to any of the documentation about this? I installed the Expo CLI months ago and at the time it was recommended to install it globally. Thanks 👍 |
@eettaa i have the same issue " ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
|
There are two options discussed on the thread so far:
I believe both work |
Faced exactly same issue after webpack v5 upgrade. Since this is referred to the webpack itself, not to the expo solutions are referred to the webpack config. For the issue with abort-controller:
source: stoplightio/elements#1777 (comment) for the sourcemap warnings: there are also more explanation why this is happening in each link :) |
Just wanted to point out that im having the same issue here as @eettaa . For the moment im going to downgrade to expo 6.1.0. Hope there is a solution soon. |
Same issue with SDK 48 and expo-cli@6.3.2 SDK 48 expo-cli 6.1.0 expo-cli 6.3.2 So SDK 48 can't build web. |
I have the same issue as the original post. I'm using Expo SDK 45 and the automated build process as part of the AWS Amplify hosting. My app is in production so I am unable to update the web version at the moment. 😡 Been trying to resolve this for four days and feel like I've tried everything. 😢 Locally, I am using Node 16 and Expo 6.2.1. If I use If I use If I use
If I get rid of the
Here is my
Here is my
Here is my
Please can someone help me resolve this? |
As fas as I know the solution will be to manually migrate your webpack.config to make it compatible with the new webpack version. Another option (the one I used) is to force expo to work with a previous working version. |
Thanks so much for the response, @eacanalg Please can you provide a little more detail on how you forced Expo to work? Thanks in advance |
@RecognitionApp In your case go into your amplify build settings. Edit the YML, look for "frontend", "prebuild", "commands". |
@eacanalg Thank you so much. Build completed. Really appreciate your help. |
just putting this out there so it can help others out, since this post helped me out a lot. my aws amplify app was failing frontend builds due to this in my amplify.yml, I changed to
and builds started working! expo version: ~47 |
@russell-d This change worked for me on Expo 48. I've been working on the issue of amplify builds failing for the past several hours trying to deploy my app. Thank you so much! The specific error I had been fighting was the following: TypeError: The 'compilation' argument must be an instance of Compilation associated with webpack |
Summary
expo build:web
worked on expo-cli 6.1.x and belowexpo build:web
breaks with expo-cli 6.2.x with errors like:[18:00:53] ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.node should be one of these:
false | object { __dirname?, __filename?, global? }
-> Include polyfills or mocks for various node stuff.
Details:
* configuration.node has an unknown property 'module'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'dgram'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'dns'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'fs'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'http2'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'net'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'tls'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'child_process'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
These errors have been reproduced in AWS Amplify build environments and on local machines.
The fix for us is to move to
export:web
, but I still believe this is an undocumented breaking change (or just a bug :) )Environment
AWS Amplify hosting and also local linux environment
Please specify your device/emulator/simulator platform, model and version
AWS and linux
Error output
[18:00:53] ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.node should be one of these:
false | object { __dirname?, __filename?, global? }
-> Include polyfills or mocks for various node stuff.
Details:
* configuration.node has an unknown property 'module'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'dgram'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'dns'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'fs'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'http2'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'net'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'tls'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'child_process'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
Reproducible demo or steps to reproduce from a blank project
create a blank project
npm i g expo-cli@6.1.x
expo build:web // Works
npm i g expo-cli@6.2.x
expo build:web // broken
npx expo export:web // works, although note this is invoking a different package
The text was updated successfully, but these errors were encountered: