Skip to content
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

Files are generated under the wrong folder if no node_modules folder exists #1529

Closed
tido64 opened this issue Aug 8, 2023 · 0 comments · Fixed by #1530
Closed

Files are generated under the wrong folder if no node_modules folder exists #1529

tido64 opened this issue Aug 8, 2023 · 0 comments · Fixed by #1530
Labels
bug Something isn't working

Comments

@tido64
Copy link
Member

tido64 commented Aug 8, 2023

This looks like a bug in RNTA. node_modules is no longer created under /apps/fluent-tester, so it generates Windows project files under /node_modules instead while app.json assumes /apps/fluent-tester/node_modules. As a workaround, you can do this:

diff --git a/apps/fluent-tester/react-native.config.js b/apps/fluent-tester/react-native.config.js
index 1bae4e2a6..12ee75eea 100644
--- a/apps/fluent-tester/react-native.config.js
+++ b/apps/fluent-tester/react-native.config.js
@@ -1,7 +1,7 @@
 const project = (() => {
   try {
     const { configureProjects } = require('react-native-test-app');
-    return configureProjects({
+    const project = configureProjects({
       android: {
         sourceDir: 'android',
       },
@@ -13,6 +13,11 @@ const project = (() => {
         solutionFile: 'windows/FluentTester.sln',
       },
     });
+    // FIXME: https://github.com/microsoft/react-native-test-app/issues/1529
+    if (project.windows) {
+      project.windows.project.projectFile = '..\\..\\' + project.windows.project.projectFile;
+    }
+    return project;
   } catch (_) {
     return undefined;
   }

Originally posted by @tido64 in microsoft/fluentui-react-native#2980 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant