-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Open
Labels
Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch @react-native/community-cli-plugin@0.77.3 for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/start/middleware.js b/node_modules/@react-native/community-cli-plugin/dist/commands/start/middleware.js
index 183ec72..65701cc 100644
--- a/node_modules/@react-native/community-cli-plugin/dist/commands/start/middleware.js
+++ b/node_modules/@react-native/community-cli-plugin/dist/commands/start/middleware.js
@@ -36,8 +36,10 @@ try {
const communityCliServerApi = require(communityCliServerApiPath);
communityMiddlewareFallback.createDevServerMiddleware =
communityCliServerApi.createDevServerMiddleware;
- communityMiddlewareFallback.indexPageMiddleware =
- communityCliServerApi.indexPageMiddleware;
+ if (communityCliServerApi.indexPageMiddleware) {
+ communityMiddlewareFallback.indexPageMiddleware =
+ communityCliServerApi.indexPageMiddleware;
+ }
} catch {
debug(`⚠️ Unable to find @react-native-community/cli-server-api
Starting the server without the community middleware.`);This issue body was partially generated by patch-package.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.