Problem getting first React Native app configured in WebStorm 2025.1

Using WS 2025.1, I created a new React Native project, then followed the “Run instrictions for iOS”. I cd'd into the path provided then ran “bundle install” successfully, then …

➜  ios git:(main) ✗ bundle exec pod install

[!] Invalid `Podfile` file: [!] /usr/local/bin/node -p require.resolve(
   "react-native/scripts/react_native_pods.rb",
   {paths: [process.argv[1]]},
 ) /private/var/folders/9q/kgvb8_wj49396jqq1d9ccv940000gn/T/12930237860956465537/mr_discovery/ios

node:internal/modules/cjs/loader:1247
 throw err;
 ^

Error: Cannot find module 'react-native/scripts/react_native_pods.rb'
 

0
What package manager do you use? Please see https://github.com/facebook/react-native/issues/44411 for some hints.
0

Thanks for looking at my post.

I went about this in a different direction. I completely deleted this project and started a new one. This time after all the dependencies had been installed, rather than following the suggestions in the console log, I control-clicked the "iOS" directory displayed in the Project panel, and selected "Open in > Terminal". From there, I entered "pod install". Then, remaining in the Terminal, I opened the app's xcworkspace file to launch Xcode and properly signed the project so it could be installed on my development device.

Since I was able to build and deploy the beginning app, why is there a duplicate set of files stored in /private/var/folders… ? Based on my experience, it does not seem like these “hidden” files are necessary.

0
I'm not sure, I'd suggest asking this question at React Native forums.
0

The command used by the JetBrains IDE to generate a React Native project appears to be out of date.  The IDE uses “/usr/local/bin/npx --yes --package @react-native-community/cli@latest rnc-cli init MyApp --skip-install” to generate a new project. Current recommended usage is more like “npx react-native@latest init MyProject" plus a --template argument could specify TypeScript, as well. Hopefully JetBrains IDEs will be updated to reflect this and possible other changes. Thanks.

0

Using npx @react-native-community/cli@latest init is still recommended here: https://reactnative.dev/docs/getting-started-without-a-framework.

But I must admit that our React Native support is a bit outdated and needs improvements. For example, debugging doesn't work reliably, please see WEB-62841., creating new Expo projects from the New project wizard is not supported (WEB-30711).
 
We are working on improving the React Native experience in scope of the WEB-60799 task. Unfortunately, at the moment we can't provide the exact timeline when it's going to be implemented.

0

请先登录再写评论。