-
Notifications
You must be signed in to change notification settings - Fork 138
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
Unable to setup using npx react-native-macos-init #2152
Comments
Hi, we're aware of this issue, and working on fixing it with the next React Native macOS release. Meanwhile you can locally patch with the fix here: b15e168 |
Patch was not helpful for me npx react-native-macos-init
Running Patched version of react-native-macos-init
Reading application name from package.json…
Reading react-native version from node_modules…
Reading react-native-macos version from node_modules…
Latest matching version of react-native-macos for [email protected] is [email protected].
Installing react-native-macos@^0.71.0-0…
Command failed: yarn add --silent "react-native-macos@^0.71.0-0" Error: Command failed: yarn add --silent "react-native-macos@^0.71.0-0"
at checkExecSyncError (node:child_process:890:11)
at Object.execSync (node:child_process:962:15)
at Object.<anonymous> (/Users/antonmorozov/Desktop/Freelance/GlobalObsidianSwitcher/node_modules/react-native-macos-init/lib-commonjs/cli.js:247:29)
at Generator.next (<anonymous>)
at fulfilled (/Users/antonmorozov/Desktop/Freelance/GlobalObsidianSwitcher/node_modules/react-native-macos-init/lib-commonjs/cli.js:10:58)
at runNextTicks (node:internal/process/task_queues:60:5)
at process.processImmediate (node:internal/timers:447:9) {
status: 1,
signal: null,
output: [
null,
<Buffer 1b 5b 33 31 6d 1b 5b 31 6d 55 73 61 67 65 20 45 72 72 6f 72 1b 5b 32 32 6d 1b 5b 33 39 6d 3a 20 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 63 61 6e 20 6f ... 368 more bytes>,
<Buffer >
],
pid: 19208,
stdout: <Buffer 1b 5b 33 31 6d 1b 5b 31 6d 55 73 61 67 65 20 45 72 72 6f 72 1b 5b 32 32 6d 1b 5b 33 39 6d 3a 20 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 63 61 6e 20 6f ... 368 more bytes>,
stderr: <Buffer >
} |
Running cli comand like so npx react-native-macos-init --verbose=true
Running Patched version of react-native-macos-init
Using verbose: true
Reading application name from package.json…
Reading react-native version from node_modules…
Reading react-native-macos version from node_modules…
Latest matching version of react-native-macos for [email protected] is [email protected].
Installing react-native-macos@^0.71.0-0…
➤ YN0000: ┌ Resolution step
➤ YN0002: │ react-native-codegen@npm:0.71.6 doesn't provide @babel/preset-env (p051ae), requested by jscodeshift
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 712ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ @react-native-community/cli-platform-ios@npm:10.2.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ @react-native-community/cli@npm:10.2.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ react-native-macos@npm:0.71.36 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 0s 914ms
➤ YN0000: Done with warnings in 1s 896ms
react-native-macos@^0.71.0-0 successfully installed!
removed 78 packages, changed 1 package, and audited 981 packages in 4s
143 packages are looking for funding
run `npm fund` for details
13 vulnerabilities (7 moderate, 6 high)
To address issues that do not require attention, run:
npm audit fix
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
new macos/Podfile
new macos/.gitignore
new macos/GlobalObsidianSwitcher-macOS/AppDelegate.h
new macos/GlobalObsidianSwitcher-macOS/AppDelegate.mm
new macos/GlobalObsidianSwitcher-macOS/Assets.xcassets/AppIcon.appiconset/Contents.json
new macos/GlobalObsidianSwitcher-macOS/Assets.xcassets/Contents.json
new macos/GlobalObsidianSwitcher-macOS/Base.lproj/Main.storyboard
new macos/GlobalObsidianSwitcher-macOS/GlobalObsidianSwitcher.entitlements
new macos/GlobalObsidianSwitcher-macOS/Info.plist
new macos/GlobalObsidianSwitcher-macOS/main.m
new macos/GlobalObsidianSwitcher.xcodeproj/project.pbxproj
new macos/GlobalObsidianSwitcher.xcodeproj/xcshareddata/xcschemes/GlobalObsidianSwitcher-macOS.xcscheme
Scanning for pods...
1.15.2
> pod install
[!] Invalid `Podfile` file: cannot load such file -- /Users/antonmorozov/Desktop/Freelance/GlobalObsidianSwitcher/node_modules/node_modules/react-native-macos/scripts/react_native_pods.
# from /Users/antonmorozov/Desktop/Freelance/GlobalObsidianSwitcher/node_modules/macos/Podfile:1
# -------------------------------------------
> require_relative '../node_modules/react-native-macos/scripts/react_native_pods'
# require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
# -------------------------------------------
Couldn't install Pods. Updating the Pods project and trying again...
> pod install --repo-update
[!] Invalid `Podfile` file: cannot load such file -- /Users/antonmorozov/Desktop/Freelance/GlobalObsidianSwitcher/node_modules/node_modules/react-native-macos/scripts/react_native_pods.
# from /Users/antonmorozov/Desktop/Freelance/GlobalObsidianSwitcher/node_modules/macos/Podfile:1
# -------------------------------------------
> require_relative '../node_modules/react-native-macos/scripts/react_native_pods'
# require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
# -------------------------------------------
Couldn't install Pods. Updating the Pods project and trying again...
Command `pod install` failed.
└─ Cause: Invalid `Podfile` file: cannot load such file -- /Users/antonmorozov/Desktop/Freelance/GlobalObsidianSwitcher/node_modules/node_modules/react-native-macos/scripts/react_native_pods.
# from /Users/antonmorozov/Desktop/Freelance/GlobalObsidianSwitcher/node_modules/macos/Podfile:1
# -------------------------------------------
> require_relative '../node_modules/react-native-macos/scripts/react_native_pods'
# require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
# -------------------------------------------
pod install --repo-update --ansi exited with non-zero code: 1
Command failed: npx pod-install --non-interactive Error: Command failed: npx pod-install --non-interactive
at checkExecSyncError (node:child_process:890:11)
at Object.execSync (node:child_process:962:15)
at installPods (/Users/antonmorozov/Desktop/Freelance/GlobalObsidianSwitcher/node_modules/react-native-macos/local-cli/generator-macos/index.js:131:16)
at generateMacOS (/Users/antonmorozov/Desktop/Freelance/GlobalObsidianSwitcher/node_modules/react-native-macos/local-cli/generate-macos.js:33:3)
at Object.<anonymous> (/Users/antonmorozov/Desktop/Freelance/GlobalObsidianSwitcher/node_modules/react-native-macos-init/lib-commonjs/cli.js:255:9)
at Generator.next (<anonymous>)
at fulfilled (/Users/antonmorozov/Desktop/Freelance/GlobalObsidianSwitcher/node_modules/react-native-macos-init/lib-commonjs/cli.js:10:58)
at runNextTicks (node:internal/process/task_queues:60:5)
at process.processImmediate (node:internal/timers:447:9) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 22462,
stdout: null,
stderr: null
} |
Just to give an update, I am looking at getting this fixed and published. I apologize for the delay. |
Fixed with version 2.1.2 |
Problem Description
I'm trying to follow the steps from the Get Started with macOS, but I got stuck with the macos init
Here is the output from the terminal
Nodejs version : v20.11.1
Steps To Reproduce
npx react-native@latest init trial_app --version 0.71.0
cd trial_app
npx react-native-macos-init
Expected Results
No response
CLI version
10.0.0
Environment
Community Modules
No response
Target Platform Version
None
Target Device(s)
No response
Visual Studio Version
None
Build Configuration
None
Snack, code example, screenshot, or link to a repository
No response
The text was updated successfully, but these errors were encountered: