Giter Site home page Giter Site logo

Comments (3)

tido64 avatar tido64 commented on June 15, 2024 1

Sorry for closing this issue too early.

You're right in that we should probably not pick 0.72 if it's unavailable. If you don't provide --version, we currently look at the react-native version that is being used in the monorepo, and if that doesn't exist, use the latest version of react-native to determine what's currently available. This does assume that if a minor version is available for react-native, it's available for all other platforms as well. It's a bit simplified, and it obviously fails in this scenario. As a quick workaround, you can explicitly specify --version to get around this.

To fully address this, I think we need to add logic to determine the greatest common version, and make sure the user understands that we may not be able to use the latest version.

from react-native-test-app.

tido64 avatar tido64 commented on June 15, 2024

Hi @jparismorgan, the latest version of react-native-macos is currently 0.71.29. The 0.72 series has not been released yet. For available versions, see: https://www.npmjs.com/package/react-native-macos?activeTab=versions

from react-native-test-app.

jparismorgan avatar jparismorgan commented on June 15, 2024

Isn't this a bug in react-native-test-app ^2.5.14 then? I didn't specify which version of react-native-macos to use, I just wanted to initialize a project. Shouldn't react-native-test-app just pick a valid version for me to use?

As a side note, I switched to ^2.5.9 and was able to create the project. But I'm still not able to build - it seems that the macos/ folder is missing and the podfile has an error:

~/repo/foo/apps/app$ pnpm i                                                                                                                                                                                                                          
Scope: all 10 workspace projects
../osx                                   |  WARN  deprecated [email protected]
../osx                                   |  WARN  deprecated [email protected]
../osx                                   |  WARN  deprecated [email protected]
../osx                                   |  WARN  deprecated [email protected]
../osx                                   |  WARN  deprecated [email protected]
../..                                    |   +1   -1 +-
../..                                    | Progress: resolved 1459, reused 1384, downloaded 0, added 0, done

dependencies:
+ react 18.2.0
+ react-native 0.71.12 (0.72.3 is available)
+ react-native-macos 0.71.26 (0.71.29 is available)

devDependencies:
+ @babel/core 7.22.9
+ @babel/preset-env 7.22.9
+ @babel/runtime 7.22.6
+ @react-native-community/eslint-config 3.2.0
+ @tsconfig/react-native 2.0.2 (3.0.2 is available)
+ @types/jest 29.2.1 (29.5.3 is available)
+ @types/react 18.2.18
+ @types/react-test-renderer 18.0.0
+ babel-jest 29.2.1 (29.6.2 is available)
+ eslint 8.46.0
+ jest 29.2.1 (29.6.2 is available)
+ metro-react-native-babel-preset 0.73.10 (0.77.0 is available)
+ prettier 2.4.1 (3.0.1 is available)
+ react-test-renderer 18.2.0
+ typescript 4.8.4 (5.1.6 is available)

Done in 5.9s
~/repo/foo/apps/app$ pnpm run macos                                                                                                                                                                                                                  

> [email protected] macos /Users/parismorgan/repo/foo/apps/app
> react-native run-macos --scheme Foo

error macOS project folder not found. Are you sure this is a React Native project?.
info Run CLI with --verbose flag for more details.
 ELIFECYCLE  Command failed with exit code 1.
~/repo/foo/apps/app$ ls                                                                                                                                                                                                                         
App.tsx                Podfile                app.json               babel.config.js        index.js               metro.config.js        node_modules           package.json           react-native.config.js
~/repo/foo/apps/app$ pod install                                                                                                                                                                                                                     

[!] Invalid `Podfile` file: Cannot find module '@react-native-community/cli-platform-ios'.

 #  from /Users/parismorgan/repo/foo/apps/app/Podfile:5
 #  -------------------------------------------
 #  
 >  use_test_app!
 #  -------------------------------------------

from react-native-test-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.