ptmt / react-native-macos

[deprecated in favor of https://microsoft.github.io/react-native-windows/] React Native for macOS is an experimental fork for writing desktop apps using Cocoa
MIT License
11.25k stars 429 forks source link

`react-native-macos init MyProject` fails. #248

Open bslayerw opened 4 years ago

bslayerw commented 4 years ago

πŸ› 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 > core-js@2.6.11: 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 > core-js@2.6.11: 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 > core-js@1.2.7: 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 > core-js@2.6.11: 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/cli@2.10.0" has unmet peer dependency "react-native@^0.60.0".
warning "react-native-macos > metro-react-native-babel-transformer@0.54.1" has unmet peer dependency "@babel/core@*".
warning " > react-native-macos@0.60.0-microsoft.50" has unmet peer dependency "react@16.8.6".
[4/4] πŸ”¨  Building fresh packages...
success Saved lockfile.
success Saved 423 new dependencies.
info Direct dependencies
└─ react-native-macos@0.60.0-microsoft.50
info All dependencies
β”œβ”€ @babel/code-frame@7.8.3
β”œβ”€ @babel/helper-builder-binary-assignment-operator-visitor@7.8.3
β”œβ”€ @babel/helper-builder-react-jsx@7.8.3
β”œβ”€ @babel/helper-call-delegate@7.8.3
β”œβ”€ @babel/helper-create-regexp-features-plugin@7.8.3
β”œβ”€ @babel/helper-define-map@7.8.3
β”œβ”€ @babel/helper-explode-assignable-expression@7.8.3
β”œβ”€ @babel/helper-hoist-variables@7.8.3
β”œβ”€ @babel/helper-module-imports@7.8.3
β”œβ”€ @babel/helper-module-transforms@7.8.3
β”œβ”€ @babel/helper-remap-async-to-generator@7.8.3
β”œβ”€ @babel/helper-wrap-function@7.8.3
β”œβ”€ @babel/helpers@7.8.4
β”œβ”€ @babel/highlight@7.8.3
β”œβ”€ @babel/parser@7.8.4
β”œβ”€ @babel/plugin-external-helpers@7.8.3
β”œβ”€ @babel/plugin-proposal-export-default-from@7.8.3
β”œβ”€ @babel/plugin-syntax-class-properties@7.8.3
β”œβ”€ @babel/plugin-syntax-dynamic-import@7.8.3
β”œβ”€ @babel/plugin-syntax-export-default-from@7.8.3
β”œβ”€ @babel/plugin-syntax-flow@7.8.3
β”œβ”€ @babel/plugin-syntax-nullish-coalescing-operator@7.8.3
β”œβ”€ @babel/plugin-syntax-object-rest-spread@7.8.3
β”œβ”€ @babel/plugin-syntax-optional-catch-binding@7.8.3
β”œβ”€ @babel/plugin-syntax-optional-chaining@7.8.3
β”œβ”€ @babel/plugin-syntax-typescript@7.8.3
β”œβ”€ @babel/plugin-transform-async-to-generator@7.8.3
β”œβ”€ @babel/plugin-transform-block-scoped-functions@7.8.3
β”œβ”€ @babel/plugin-transform-exponentiation-operator@7.8.3
β”œβ”€ @babel/plugin-transform-member-expression-literals@7.8.3
β”œβ”€ @babel/plugin-transform-object-assign@7.8.3
β”œβ”€ @babel/plugin-transform-object-super@7.8.3
β”œβ”€ @babel/plugin-transform-property-literals@7.8.3
β”œβ”€ @babel/plugin-transform-react-jsx-source@7.8.3
β”œβ”€ @babel/plugin-transform-regenerator@7.8.3
β”œβ”€ @babel/plugin-transform-runtime@7.8.3
β”œβ”€ @babel/plugin-transform-sticky-regex@7.8.3
β”œβ”€ @babel/plugin-transform-typescript@7.8.3
β”œβ”€ @babel/plugin-transform-unicode-regex@7.8.3
β”œβ”€ @babel/register@7.8.3
β”œβ”€ @babel/runtime@7.8.4
β”œβ”€ @cnakazawa/watch@1.0.4
β”œβ”€ @hapi/address@2.1.4
β”œβ”€ @hapi/bourne@1.3.2
β”œβ”€ @hapi/hoek@8.5.1
β”œβ”€ @hapi/joi@15.1.1
β”œβ”€ @hapi/topo@3.1.6
β”œβ”€ @jest/fake-timers@24.9.0
β”œβ”€ @react-native-community/cli-platform-android@2.9.0
β”œβ”€ @react-native-community/cli-platform-ios@2.10.0
β”œβ”€ @react-native-community/cli@2.10.0
β”œβ”€ @types/istanbul-lib-report@3.0.0
β”œβ”€ @types/istanbul-reports@1.1.1
β”œβ”€ @types/stack-utils@1.0.1
β”œβ”€ @types/yargs-parser@15.0.0
β”œβ”€ @types/yargs@13.0.8
β”œβ”€ abbrev@1.1.1
β”œβ”€ abort-controller@3.0.0
β”œβ”€ accepts@1.3.7
β”œβ”€ ansi-colors@1.1.0
β”œβ”€ ansi-cyan@0.1.1
β”œβ”€ ansi-escapes@3.2.0
β”œβ”€ ansi-fragments@0.2.1
β”œβ”€ ansi-gray@0.1.1
β”œβ”€ ansi-red@0.1.1
β”œβ”€ ansi-regex@4.1.0
β”œβ”€ aproba@1.2.0
β”œβ”€ are-we-there-yet@1.1.5
β”œβ”€ argparse@1.0.10
β”œβ”€ arr-flatten@1.1.0
β”œβ”€ array-filter@0.0.1
β”œβ”€ array-map@0.0.0
β”œβ”€ array-reduce@0.0.0
β”œβ”€ array-slice@0.2.3
β”œβ”€ art@0.10.3
β”œβ”€ asap@2.0.6
β”œβ”€ assign-symbols@1.0.0
β”œβ”€ astral-regex@1.0.0
β”œβ”€ async-limiter@1.0.1
β”œβ”€ async@2.6.3
β”œβ”€ atob@2.1.2
β”œβ”€ babel-plugin-dynamic-import-node@2.3.0
β”œβ”€ babel-plugin-syntax-trailing-function-commas@7.0.0-beta.0
β”œβ”€ balanced-match@1.0.0
β”œβ”€ base@0.11.2
β”œβ”€ base64-js@1.3.1
β”œβ”€ basic-auth@2.0.1
β”œβ”€ big-integer@1.6.48
β”œβ”€ bindings@1.5.0
β”œβ”€ bplist-creator@0.0.8
β”œβ”€ bplist-parser@0.2.0
β”œβ”€ brace-expansion@1.1.11
β”œβ”€ braces@2.3.2
β”œβ”€ bser@2.1.1
β”œβ”€ buffer-crc32@0.2.13
β”œβ”€ bytes@3.0.0
β”œβ”€ cache-base@1.0.1
β”œβ”€ caller-callsite@2.0.0
β”œβ”€ caller-path@2.0.0
β”œβ”€ capture-exit@2.0.0
β”œβ”€ chardet@0.4.2
β”œβ”€ chownr@1.1.4
β”œβ”€ ci-info@2.0.0
β”œβ”€ class-utils@0.3.6
β”œβ”€ cli-spinners@2.2.0
β”œβ”€ cli-width@2.2.0
β”œβ”€ cliui@3.2.0
β”œβ”€ clone@1.0.4
β”œβ”€ code-point-at@1.1.0
β”œβ”€ collection-visit@1.0.0
β”œβ”€ color-convert@1.9.3
β”œβ”€ color-name@1.1.3
β”œβ”€ color-support@1.1.3
β”œβ”€ colorette@1.1.0
β”œβ”€ commander@2.20.3
β”œβ”€ commondir@1.0.1
β”œβ”€ compressible@2.0.18
β”œβ”€ compression@1.7.4
β”œβ”€ concat-map@0.0.1
β”œβ”€ concat-stream@1.6.2
β”œβ”€ console-control-strings@1.1.0
β”œβ”€ convert-source-map@1.7.0
β”œβ”€ copy-descriptor@0.1.1
β”œβ”€ core-js@2.6.11
β”œβ”€ core-util-is@1.0.2
β”œβ”€ cosmiconfig@5.2.1
β”œβ”€ create-react-class@15.6.3
β”œβ”€ cross-spawn@5.1.0
β”œβ”€ dayjs@1.8.20
β”œβ”€ debug@2.6.9
β”œβ”€ decode-uri-component@0.2.0
β”œβ”€ deep-extend@0.6.0
β”œβ”€ deepmerge@3.3.0
β”œβ”€ defaults@1.0.3
β”œβ”€ define-properties@1.1.3
β”œβ”€ delegates@1.0.0
β”œβ”€ denodeify@1.2.1
β”œβ”€ destroy@1.0.4
β”œβ”€ detect-libc@1.0.3
β”œβ”€ dom-walk@0.1.1
β”œβ”€ ee-first@1.1.1
β”œβ”€ encoding@0.1.12
β”œβ”€ end-of-stream@1.4.4
β”œβ”€ envinfo@7.5.0
β”œβ”€ error-ex@1.3.2
β”œβ”€ errorhandler@1.5.1
β”œβ”€ esprima@4.0.1
β”œβ”€ esutils@2.0.3
β”œβ”€ etag@1.8.1
β”œβ”€ event-target-shim@5.0.1
β”œβ”€ eventemitter3@3.1.2
β”œβ”€ expand-brackets@2.1.4
β”œβ”€ external-editor@2.2.0
β”œβ”€ extglob@2.0.4
β”œβ”€ fancy-log@1.3.3
β”œβ”€ fbjs-css-vars@1.0.2
β”œβ”€ fbjs-scripts@1.2.0
β”œβ”€ figures@2.0.0
β”œβ”€ file-uri-to-path@1.0.0
β”œβ”€ fill-range@4.0.0
β”œβ”€ finalhandler@1.1.2
β”œβ”€ find-cache-dir@2.1.0
β”œβ”€ for-in@1.0.2
β”œβ”€ fresh@0.5.2
β”œβ”€ fs-extra@7.0.1
β”œβ”€ fs-minipass@1.2.7
β”œβ”€ fs.realpath@1.0.0
β”œβ”€ fsevents@1.2.11
β”œβ”€ function-bind@1.1.1
β”œβ”€ gauge@2.7.4
β”œβ”€ gensync@1.0.0-beta.1
β”œβ”€ get-stream@4.1.0
β”œβ”€ get-value@2.0.6
β”œβ”€ glob@7.1.6
β”œβ”€ global@4.4.0
β”œβ”€ growly@1.3.0
β”œβ”€ has-symbols@1.0.1
β”œβ”€ has-unicode@2.0.1
β”œβ”€ has-value@1.0.0
β”œβ”€ hermesvm@0.1.1
β”œβ”€ hosted-git-info@2.8.5
β”œβ”€ http-errors@1.7.3
β”œβ”€ iconv-lite@0.4.24
β”œβ”€ ignore-walk@3.0.3
β”œβ”€ image-size@0.6.3
β”œβ”€ import-fresh@2.0.0
β”œβ”€ imurmurhash@0.1.4
β”œβ”€ inflight@1.0.6
β”œβ”€ inherits@2.0.4
β”œβ”€ ini@1.3.5
β”œβ”€ inquirer@3.3.0
β”œβ”€ invert-kv@1.0.0
β”œβ”€ is-accessor-descriptor@1.0.0
β”œβ”€ is-arrayish@0.2.1
β”œβ”€ is-ci@2.0.0
β”œβ”€ is-data-descriptor@1.0.0
β”œβ”€ is-descriptor@1.0.2
β”œβ”€ is-directory@0.3.1
β”œβ”€ is-plain-object@2.0.4
β”œβ”€ is-promise@2.1.0
β”œβ”€ is-windows@1.0.2
β”œβ”€ isarray@1.0.0
β”œβ”€ isexe@2.0.0
β”œβ”€ jest-get-type@24.9.0
β”œβ”€ jest-message-util@24.9.0
β”œβ”€ jest-mock@24.9.0
β”œβ”€ jest-serializer@24.9.0
β”œβ”€ jest-util@24.9.0
β”œβ”€ jest-validate@24.9.0
β”œβ”€ jest-worker@24.9.0
β”œβ”€ jetifier@1.6.5
β”œβ”€ js-tokens@4.0.0
β”œβ”€ js-yaml@3.13.1
β”œβ”€ jsc-android@245459.0.0
β”œβ”€ jsesc@2.5.2
β”œβ”€ json-parse-better-errors@1.0.2
β”œβ”€ json-stable-stringify@1.0.1
β”œβ”€ json5@2.1.1
β”œβ”€ jsonfile@4.0.0
β”œβ”€ kind-of@3.2.2
β”œβ”€ klaw@1.3.1
β”œβ”€ lcid@1.0.0
β”œβ”€ leven@3.1.0
β”œβ”€ load-json-file@2.0.0
β”œβ”€ locate-path@3.0.0
β”œβ”€ log-symbols@2.2.0
β”œβ”€ logkitty@0.6.1
β”œβ”€ loose-envify@1.4.0
β”œβ”€ lru-cache@4.1.5
β”œβ”€ make-dir@2.1.0
β”œβ”€ makeerror@1.0.11
β”œβ”€ map-age-cleaner@0.1.3
β”œβ”€ map-visit@1.0.0
β”œβ”€ mem@1.1.0
β”œβ”€ merge-stream@1.0.1
β”œβ”€ metro-babel7-plugin-react-transform@0.54.1
β”œβ”€ metro-config@0.54.1
β”œβ”€ metro-inspector-proxy@0.54.1
β”œβ”€ metro-minify-uglify@0.54.1
β”œβ”€ metro-react-native-babel-transformer@0.54.1
β”œβ”€ metro-source-map@0.55.0
β”œβ”€ metro-symbolicate@0.55.0
β”œβ”€ metro@0.54.1
β”œβ”€ mime-db@1.43.0
β”œβ”€ mime-types@2.1.11
β”œβ”€ mime@2.4.4
β”œβ”€ min-document@2.19.0
β”œβ”€ minimatch@3.0.4
β”œβ”€ minimist@1.2.0
β”œβ”€ minipass@2.9.0
β”œβ”€ minizlib@1.3.3
β”œβ”€ mixin-deep@1.3.2
β”œβ”€ mkdirp@0.5.1
β”œβ”€ morgan@1.9.1
β”œβ”€ ms@2.1.2
β”œβ”€ mute-stream@0.0.7
β”œβ”€ nan@2.14.0
β”œβ”€ nanomatch@1.2.13
β”œβ”€ needle@2.3.2
β”œβ”€ negotiator@0.6.2
β”œβ”€ nice-try@1.0.5
β”œβ”€ node-fetch@2.6.0
β”œβ”€ node-int64@0.4.0
β”œβ”€ node-modules-regexp@1.0.0
β”œβ”€ node-notifier@5.4.3
β”œβ”€ node-pre-gyp@0.14.0
β”œβ”€ nopt@4.0.1
β”œβ”€ normalize-package-data@2.5.0
β”œβ”€ normalize-path@2.1.1
β”œβ”€ npm-bundled@1.1.1
β”œβ”€ npm-packlist@1.4.8
β”œβ”€ npmlog@4.1.2
β”œβ”€ number-is-nan@1.0.1
β”œβ”€ ob1@0.55.0
β”œβ”€ object-assign@4.1.1
β”œβ”€ object-copy@0.1.0
β”œβ”€ object-keys@1.1.1
β”œβ”€ object.assign@4.1.0
β”œβ”€ on-headers@1.0.2
β”œβ”€ once@1.4.0
β”œβ”€ onetime@2.0.1
β”œβ”€ open@6.4.0
β”œβ”€ options@0.0.6
β”œβ”€ ora@3.4.0
β”œβ”€ os-homedir@1.0.2
β”œβ”€ os-locale@2.1.0
β”œβ”€ os-tmpdir@1.0.2
β”œβ”€ osenv@0.1.5
β”œβ”€ p-defer@1.0.0
β”œβ”€ p-is-promise@2.1.0
β”œβ”€ p-limit@2.2.2
β”œβ”€ p-locate@3.0.0
β”œβ”€ p-try@2.2.0
β”œβ”€ parse-json@4.0.0
β”œβ”€ parse-node-version@1.0.1
β”œβ”€ pascalcase@0.1.1
β”œβ”€ path-is-absolute@1.0.1
β”œβ”€ path-key@2.0.1
β”œβ”€ path-parse@1.0.6
β”œβ”€ path-type@2.0.0
β”œβ”€ pirates@4.0.1
β”œβ”€ pkg-dir@3.0.0
β”œβ”€ plist@3.0.1
β”œβ”€ plugin-error@0.1.2
β”œβ”€ posix-character-classes@0.1.1
β”œβ”€ pretty-format@24.9.0
β”œβ”€ private@0.1.8
β”œβ”€ process-nextick-args@2.0.1
β”œβ”€ process@0.11.10
β”œβ”€ prop-types@15.7.2
β”œβ”€ pseudomap@1.0.2
β”œβ”€ pump@3.0.0
β”œβ”€ range-parser@1.2.1
β”œβ”€ rc@1.2.8
β”œβ”€ react-deep-force-update@1.1.2
β”œβ”€ react-devtools-core@3.6.3
β”œβ”€ react-is@16.12.0
β”œβ”€ react-native-macos@0.60.0-microsoft.50
β”œβ”€ react-proxy@1.1.8
β”œβ”€ read-pkg-up@2.0.0
β”œβ”€ read-pkg@2.0.0
β”œβ”€ readable-stream@2.3.7
β”œβ”€ regenerate-unicode-properties@8.1.0
β”œβ”€ regenerator-transform@0.14.1
β”œβ”€ regexpu-core@4.6.0
β”œβ”€ regjsgen@0.5.1
β”œβ”€ regjsparser@0.6.2
β”œβ”€ remove-trailing-separator@1.1.0
β”œβ”€ repeat-element@1.1.3
β”œβ”€ resolve-from@3.0.0
β”œβ”€ resolve-url@0.2.1
β”œβ”€ resolve@1.15.1
β”œβ”€ restore-cursor@2.0.0
β”œβ”€ ret@0.1.15
β”œβ”€ rimraf@2.7.1
β”œβ”€ rsvp@4.8.5
β”œβ”€ run-async@2.3.0
β”œβ”€ rx-lite-aggregates@4.0.8
β”œβ”€ rx-lite@4.0.8
β”œβ”€ rxjs@5.5.12
β”œβ”€ safer-buffer@2.1.2
β”œβ”€ sane@4.1.0
β”œβ”€ sax@1.2.4
β”œβ”€ scheduler@0.14.0
β”œβ”€ semver@5.7.1
β”œβ”€ send@0.17.1
β”œβ”€ serialize-error@2.1.0
β”œβ”€ serve-static@1.14.1
β”œβ”€ set-blocking@2.0.0
β”œβ”€ set-value@2.0.1
β”œβ”€ setprototypeof@1.1.1
β”œβ”€ shebang-regex@1.0.0
β”œβ”€ shell-quote@1.6.1
β”œβ”€ shellwords@0.1.1
β”œβ”€ signal-exit@3.0.2
β”œβ”€ simple-plist@1.1.0
β”œβ”€ slice-ansi@2.1.0
β”œβ”€ slide@1.1.6
β”œβ”€ snapdragon-node@2.1.1
β”œβ”€ snapdragon-util@3.0.1
β”œβ”€ source-map-resolve@0.5.3
β”œβ”€ source-map-support@0.5.16
β”œβ”€ source-map-url@0.4.0
β”œβ”€ spdx-correct@3.1.0
β”œβ”€ spdx-exceptions@2.2.0
β”œβ”€ split-string@3.1.0
β”œβ”€ sprintf-js@1.0.3
β”œβ”€ stack-utils@1.0.2
β”œβ”€ stacktrace-parser@0.1.8
β”œβ”€ static-extend@0.1.2
β”œβ”€ statuses@1.5.0
β”œβ”€ stream-buffers@2.2.0
β”œβ”€ string_decoder@1.1.1
β”œβ”€ string-width@2.1.1
β”œβ”€ strip-ansi@3.0.1
β”œβ”€ strip-bom@3.0.0
β”œβ”€ strip-json-comments@2.0.1
β”œβ”€ supports-color@5.5.0
β”œβ”€ symbol-observable@1.0.1
β”œβ”€ tar@4.4.13
β”œβ”€ temp@0.8.3
β”œβ”€ throat@4.1.0
β”œβ”€ through@2.3.8
β”œβ”€ through2@2.0.5
β”œβ”€ time-stamp@1.1.0
β”œβ”€ tmp@0.0.33
β”œβ”€ to-fast-properties@2.0.0
β”œβ”€ to-object-path@0.3.0
β”œβ”€ to-regex-range@2.1.1
β”œβ”€ toidentifier@1.0.0
β”œβ”€ type-fest@0.7.1
β”œβ”€ typedarray@0.0.6
β”œβ”€ uglify-es@3.3.9
β”œβ”€ ultron@1.0.2
β”œβ”€ unicode-canonical-property-names-ecmascript@1.0.4
β”œβ”€ unicode-match-property-ecmascript@1.0.4
β”œβ”€ unicode-match-property-value-ecmascript@1.1.0
β”œβ”€ unicode-property-aliases-ecmascript@1.0.5
β”œβ”€ union-value@1.0.1
β”œβ”€ universalify@0.1.2
β”œβ”€ unpipe@1.0.0
β”œβ”€ unset-value@1.0.0
β”œβ”€ urix@0.1.0
β”œβ”€ use@3.1.1
β”œβ”€ util-deprecate@1.0.2
β”œβ”€ utils-merge@1.0.1
β”œβ”€ uuid@3.4.0
β”œβ”€ validate-npm-package-license@3.0.4
β”œβ”€ vary@1.1.2
β”œβ”€ walker@1.0.7
β”œβ”€ wcwidth@1.0.1
β”œβ”€ whatwg-fetch@3.0.0
β”œβ”€ wide-align@1.1.3
β”œβ”€ write-file-atomic@1.3.4
β”œβ”€ xcode@2.1.0
β”œβ”€ xmlbuilder@9.0.7
β”œβ”€ xmldoc@1.1.2
β”œβ”€ xmldom@0.1.31
β”œβ”€ xpipe@1.0.5
β”œβ”€ xtend@4.0.2
β”œβ”€ y18n@3.2.1
β”œβ”€ yallist@3.1.1
└─ yargs-parser@7.0.0
✨  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
dluc commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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: