-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Workaround fix for "missing-asset-registry-path" error to unblock PRs #11438
Conversation
New app projects built against main are unable to create their bundle (see microsoft#11437). As such, all PRs are blocked as the New CLI app checks all fail. The problem is that the metro config needs `transformer.assetRegistryPath` to be set to the location of `./Libraries/Image/AssetRegistry`, which for our purposes is the copy located in the RNW folder. For some reason this isn't set anymore. This PR adds a workaround of specifying that path in our app template's metro.config.js file. This unblocks our PRs but we should probably find a better place than in an app template file. Resolves microsoft#11437
This change will break all other platforms. -- it might be needed as a temp unblock tho |
Right, I don't know of better place to put it unless we want to wait for an upstream fix. Do we still have no way of making a change to metro.config.js that is one platform only? |
For now we can at least set it to: That will work for all platforms, since we redirect any react-native import to react-native-windows when building windows packages. |
@acoates-ms The string you suggested appears to work. Care to sign-off? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Description
New app projects built against main are unable to create their bundle (see #11437).
As such, all PRs are blocked as the New CLI app checks all fail.
The problem is that the metro config needs
transformer.assetRegistryPath
to be set to the location of'react-native/Libraries/Image/AssetRegistry'
, as for some reason this isn't set anymore upstream.This PR adds a workaround of specifying that path in our app template's metro.config.js file. This unblocks our PRs but we should probably find a better place than in an app template file.
Type of Change
Why
Unblock our PRs.
Resolves #11437
What
Updates the new app template's metro.config.js file with the correct path which is no longer getting set for us.
Screenshots
N/A
Testing
Tested with a new CLI app.
Microsoft Reviewers: Open in CodeFlow
Microsoft Reviewers: Open in CodeFlow