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

react-native-macos init MyProject fails. #248

Open
bslayerw opened this issue Feb 13, 2020 · 3 comments
Open

react-native-macos init MyProject fails. #248

bslayerw opened this issue Feb 13, 2020 · 3 comments
Labels

Comments

@bslayerw
Copy link

🐛 Bug Report

I cannot create a new project.
(A clear and concise description of what the bug is.)


This will walk you through creating a new React Native for macOS project in /Users/byronwright/Projects/MyProject
Using yarn v1.21.1
Installing react-native-macos...
yarn add v1.21.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning react-native-macos > fbjs-scripts > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native-macos > fbjs > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native-macos > create-react-class > fbjs > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native-macos > metro-babel-register > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "react-native-macos > @react-native-community/[email protected]" has unmet peer dependency "react-native@^0.60.0".
warning "react-native-macos > [email protected]" has unmet peer dependency "@babel/core@*".
warning " > [email protected]" has unmet peer dependency "[email protected]".
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
success Saved 423 new dependencies.
info Direct dependencies
└─ [email protected]
info All dependencies
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @cnakazawa/[email protected]
├─ @hapi/[email protected]
├─ @hapi/[email protected]
├─ @hapi/[email protected]
├─ @hapi/[email protected]
├─ @hapi/[email protected]
├─ @jest/[email protected]
├─ @react-native-community/[email protected]
├─ @react-native-community/[email protected]
├─ @react-native-community/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
✨  Done in 9.48s.
info Setting up new React Native app in /Users/byronwright/Projects/MyProject
(node:24374) UnhandledPromiseRejectionWarning: Error: Cannot find module 'react-native/package.json'
Require stack:
- /Users/byronwright/Projects/MyProject/node_modules/@react-native-community/cli/build/commands/init/initCompat.js
- /Users/byronwright/Projects/MyProject/node_modules/@react-native-community/cli/build/cliEntry.js
- /Users/byronwright/Projects/MyProject/node_modules/@react-native-community/cli/build/index.js
- /Users/byronwright/Projects/MyProject/node_modules/react-native-macos/cli.js
- /Users/byronwright/.nvm/versions/node/v12.16.0/lib/node_modules/react-native-macos-cli/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:981:15)
    at Function.Module._load (internal/modules/cjs/loader.js:863:27)
    at Module.require (internal/modules/cjs/loader.js:1043:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at generateProject (/Users/byronwright/Projects/MyProject/node_modules/@react-native-community/cli/build/commands/init/initCompat.js:114:19)
    at Object.initCompat [as init] (/Users/byronwright/Projects/MyProject/node_modules/@react-native-community/cli/build/commands/init/initCompat.js:104:9)
    at run (/Users/byronwright/.nvm/versions/node/v12.16.0/lib/node_modules/react-native-macos-cli/index.js:306:7)
    at createProject (/Users/byronwright/.nvm/versions/node/v12.16.0/lib/node_modules/react-native-macos-cli/index.js:254:3)
    at init (/Users/byronwright/.nvm/versions/node/v12.16.0/lib/node_modules/react-native-macos-cli/index.js:202:5)
    at Object.<anonymous> (/Users/byronwright/.nvm/versions/node/v12.16.0/lib/node_modules/react-native-macos-cli/index.js:155:7)
(node:24374) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:24374) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
## To Reproduce
`react-native-macos init MyProject`
Steps to reproduce the behavior:
`react-native-macos init MyProject`
## Expected Behavior
creates a new project successfully.
(A clear and concise description of what you expected to happen.)

## Minimal Reproduction

(For bugs that cannot be reproduced within RNTester, please provide a [minimal](https://stackoverflow.com/help/mcve) repository.)

## Environment
info Fetching system and libraries information...
System:
    OS: macOS 10.15.2
    CPU: (8) x64 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
    Memory: 101.79 MB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.16.0 - ~/.nvm/versions/node/v12.16.0/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.16.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 26, 27, 28
      Build Tools: 27.0.3, 28.0.3
      System Images: android-28 | Google APIs Intel x86 Atom
      Android NDK: 19.0.5232133
  IDEs:
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  npmPackages:
    react-native: ^0.61.5 => 0.61.5
  npmGlobalPackages:
    create-react-native-app: 2.0.2
    react-native-macos-cli: 2.0.1
@bslayerw bslayerw added the bug label Feb 13, 2020
@dluc
Copy link

dluc commented Feb 17, 2020

same here

(node:54011) UnhandledPromiseRejectionWarning: Error: Cannot find module 'react-native/package.json'
Require stack:
- /Users/test/workspace/me/reactnativemacos/SomeTest/node_modules/@react-native-community/cli/build/commands/init/initCompat.js
- /Users/test/workspace/me/reactnativemacos/SomeTest/node_modules/@react-native-community/cli/build/cliEntry.js
- /Users/test/workspace/me/reactnativemacos/SomeTest/node_modules/@react-native-community/cli/build/index.js
- /Users/test/workspace/me/reactnativemacos/SomeTest/node_modules/react-native-macos/cli.js
- /usr/local/lib/node_modules/react-native-macos-cli/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
    at Function.Module._load (internal/modules/cjs/loader.js:862:27)
    at Module.require (internal/modules/cjs/loader.js:1040:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at generateProject (/Users/test/workspace/me/reactnativemacos/SomeTest/node_modules/@react-native-community/cli/build/commands/init/initCompat.js:114:19)
    at Object.initCompat [as init] (/Users/test/workspace/me/reactnativemacos/SomeTest/node_modules/@react-native-community/cli/build/commands/init/initCompat.js:104:9)
    at run (/usr/local/lib/node_modules/react-native-macos-cli/index.js:306:7)
    at createProject (/usr/local/lib/node_modules/react-native-macos-cli/index.js:254:3)
    at init (/usr/local/lib/node_modules/react-native-macos-cli/index.js:202:5)
    at Object.<anonymous> (/usr/local/lib/node_modules/react-native-macos-cli/index.js:155:7)
(node:54011) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:54011) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
# npm -v
6.13.7
# node -v
v13.8.0
# yarn -v
1.22.0
# react-native -v
react-native-cli: 2.0.1
# react-native-macos -v
react-native-macos-cli: 2.0.1

@Shummy1991
Copy link

Same here

(node:88224) UnhandledPromiseRejectionWarning: Error: Cannot find module 'react-native/package.json'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:613:15)
    at Function.Module._load (internal/modules/cjs/loader.js:539:25)
    at Module.require (internal/modules/cjs/loader.js:667:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at generateProject (/Users/danielbali/macostest/node_modules/@react-native-community/cli/build/commands/init/initCompat.js:114:19)
    at Object.initCompat [as init] (/Users/danielbali/macostest/node_modules/@react-native-community/cli/build/commands/init/initCompat.js:104:9)
    at run (/Users/danielbali/.nvm/versions/node/v11.10.1/lib/node_modules/react-native-macos-cli/index.js:306:7)
    at createProject (/Users/danielbali/.nvm/versions/node/v11.10.1/lib/node_modules/react-native-macos-cli/index.js:254:3)
    at init (/Users/danielbali/.nvm/versions/node/v11.10.1/lib/node_modules/react-native-macos-cli/index.js:202:5)
    at Object.<anonymous> (/Users/danielbali/.nvm/versions/node/v11.10.1/lib/node_modules/react-native-macos-cli/index.js:155:7)
(node:88224) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:88224) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

node --version
v11.10.1

yarn --version
1.22.0

@caojianfeng
Copy link

info Setting up new React Native app in /Volumes/user/cjf/w/desktop/life_timer
(node:33596) UnhandledPromiseRejectionWarning: Error: Cannot find module 'react-native/package.json'
Require stack:

  • /Volumes/user/cjf/w/desktop/life_timer/node_modules/@react-native-community/cli/build/commands/init/initCompat.js
  • /Volumes/user/cjf/w/desktop/life_timer/node_modules/@react-native-community/cli/build/cliEntry.js
  • /Volumes/user/cjf/w/desktop/life_timer/node_modules/@react-native-community/cli/build/index.js
  • /Volumes/user/cjf/w/desktop/life_timer/node_modules/react-native-macos/cli.js
  • /Users/caojianfeng/.config/yarn/global/node_modules/react-native-macos-cli/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
    at Function.Module._load (internal/modules/cjs/loader.js:686:27)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at generateProject (/Volumes/user/cjf/w/desktop/life_timer/node_modules/@react-native-community/cli/build/commands/init/initCompat.js:114:19)
    at Object.initCompat [as init] (/Volumes/user/cjf/w/desktop/life_timer/node_modules/@react-native-community/cli/build/commands/init/initCompat.js:104:9)
    at run (/Users/caojianfeng/.config/yarn/global/node_modules/react-native-macos-cli/index.js:306:7)
    at createProject (/Users/caojianfeng/.config/yarn/global/node_modules/react-native-macos-cli/index.js:254:3)
    at init (/Users/caojianfeng/.config/yarn/global/node_modules/react-native-macos-cli/index.js:202:5)
    at Object. (/Users/caojianfeng/.config/yarn/global/node_modules/react-native-macos-cli/index.js:155:7)
    (node:33596) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
    (node:33596) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    soukenbons-iMac:desktop caojianfeng$ node --version
    v12.14.1
    soukenbons-iMac:desktop caojianfeng$ yarn --version
    1.12.3
    soukenbons-iMac:desktop caojianfeng$ npm -v
    6.13.4
    soukenbons-iMac:desktop caojianfeng$ react-native -v
    react-native-cli: 2.0.1
    react-native: n/a - not inside a React Native project directory
    soukenbons-iMac:desktop caojianfeng$ react-native-macos -v
    react-native-macos-cli: 2.0.1
    react-native-macos: n/a - not inside a React Native project directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants