Comments (3)
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.
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.
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)
- iOS/macOS: add ability to customize `Info.plist`
- Files are generated under the wrong folder if no `node_modules` folder exists
- Add support for `react-native` 0.73
- Add support for `react-native` 0.74 HOT 1
- Action Required: Fix Renovate Configuration
- Optional app.json component parameter to specify supported platforms for component HOT 8
- Quick start wiki has incorrect command in Macos section HOT 1
- Generate code from `app.json` and avoid parsing JSON at runtime HOT 3
- Add support for Bridgeless Mode
- `bundleRoot` ignored on apple HOT 1
- Improve the docs: add npm examples HOT 3
- Breaking changes in 4.0 HOT 5
- iOS / Android Assets HOT 7
- Adding Cocoapods minimum version requirement when setting up a project HOT 5
- Fresh install fails on Windows (Latest version as of this issue) HOT 1
- Is react-native-test-app's only use case: library testing or can it be used for production apps as well HOT 2
- Windows: Re-enable builds with NuGet
- Add support for `react-native` 0.75
- Testing against multiple RN versions HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-test-app.