thecodingmachine / react-native-boilerplate

A React Native template for building solid applications πŸ™, using JavaScript πŸ’› or Typescript πŸ’™ (you choose).
https://thecodingmachine.github.io/react-native-boilerplate/
MIT License
4.75k stars 864 forks source link

[BUG]: Issue while running command npx react-native init MyApp --template @thecodingmachine/react-native-boilerplate #275

Closed lkhore closed 1 year ago

lkhore commented 2 years ago

react-native environment setup

Description

[1/2] Removing module react-native-template-@thecodingmachine/react-native-boilerplate... error This module isn't specified in a package.json file. info Visit https://yarnpkg.com/en/docs/cli/remove for documentation about this command. warn Failed to clean up template temp files in node_modules/react-native-template-@thecodingmachine/react-native-boilerplate. This is not a critical error, you can work on your app. D:\Repo\TIDispense\TIDispense\node_modules\metro-hermes-compiler\src\emhermesc.js:77 throw ex; ^

RuntimeError: abort(Error: ENOENT: no such file or directory, lstat 'D:\Repo\TIDispense\TIDispense\node_modules\react-native-template-@thecodingmachine\react-native-boilerplate'). Build with -s ASSERTIONS=1 for more info. at process.abort (D:\Repo\TIDispense\TIDispense\node_modules\metro-hermes-compiler\src\emhermesc.js:440:13) at process.emit (events.js:375:28) at processPromiseRejections (internal/process/promises.js:245:33) at processTicksAndRejections (internal/process/task_queues.js:96:32)

Version

latest

On which OS this issue appear on?

Desktop OS

Windows 10

JeremyDolle commented 2 years ago

Are you sure you don't have react-native cli installed globally ? this error is generally due to this. that's why I create the checkbox I verified that I have not react-native-cli installed globally and be up to date about the React Native environment setup. on bug submissions. You can look at these issues

FanishChandrakar commented 2 years ago

Same for me as well

βœ” Downloading template
βœ” Copying template
βœ” Processing template
βœ” πŸ“˜ Using typescript ? (y/N) 

 … yes
β ¦ Executing post init script node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[Error: ENOENT: no such file or directory, scandir './node_modules/@thecodingmachine/rnb-plugin-typescript/template/'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: './node_modules/@thecodingmachine/rnb-plugin-typescript/template/'
}

Node.js v17.2.0
βœ– Executing post init script 
error Error: Command failed: /var/folders/rz/2p31mx9s0mz712tgtf5dbmv00000gn/T/rncli-init-template-7GRvys/node_modules/@thecodingmachine/react-native-boilerplate/post-init.script.js
mpiorowski commented 2 years ago

Same problem as above

JeremyDolle commented 2 years ago

What is your version of NodeJS? We found some unexpected issues with node 16 and node 17 so I encourage using nodeJS 14 and tell me if it's better !

kimmy-wang commented 2 years ago

same issue

remotenode commented 2 years ago

same issue

JeremyDolle commented 2 years ago

Please give me at least your yarn version and your node version + the printed error

kimmy-wang commented 2 years ago

yarn: 1.22.17 node: v14.19.1

kimmy-wang commented 2 years ago
ying@YingdeiMac ~ % npx react-native init MyApp --template @thecodingmachine/react-native-boilerplate
This will walk you through creating a new React Native project in /Users/ying/MyApp
Using yarn v1.22.17
Installing react-native...
yarn add v1.22.17
info No lockfile found.
[1/4] πŸ”  Resolving packages...
warning react-native > @react-native-community/cli > @react-native-community/cli-plugin-metro > metro > metro-minify-uglify > uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
warning react-native > react-native-codegen > jscodeshift > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
warning react-native > react-native-codegen > jscodeshift > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning react-native > react-native-codegen > jscodeshift > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
warning react-native > react-native-codegen > jscodeshift > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
warning "react-native > metro-react-native-babel-transformer@0.67.0" has unmet peer dependency "@babel/core@*".
warning "react-native > react-shallow-renderer@16.14.1" has unmet peer dependency "react@^16.0.0 || ^17.0.0".
warning "react-native > use-subscription@1.5.1" has unmet peer dependency "react@^16.8.0 || ^17.0.0".
warning "react-native > react-native-codegen > jscodeshift@0.13.1" has unmet peer dependency "@babel/preset-env@^7.1.6".
warning " > react-native@0.68.2" has unmet peer dependency "react@17.0.2".
[4/4] πŸ”¨  Building fresh packages...

success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.22.19", while you're on "1.22.17".
info To upgrade, run the following command:
$ brew upgrade yarn
success Saved 380 new dependencies.
info Direct dependencies
└─ react-native@0.68.2
info All dependencies
β”œβ”€ @ampproject/remapping@2.2.0
β”œβ”€ @babel/compat-data@7.17.10
β”œβ”€ @babel/helper-builder-binary-assignment-operator-visitor@7.16.7
β”œβ”€ @babel/helper-compilation-targets@7.17.10
β”œβ”€ @babel/helper-create-regexp-features-plugin@7.17.0
β”œβ”€ @babel/helper-explode-assignable-expression@7.16.7
β”œβ”€ @babel/helper-hoist-variables@7.16.7
β”œβ”€ @babel/helper-member-expression-to-functions@7.17.7
β”œβ”€ @babel/helper-module-imports@7.16.7
β”œβ”€ @babel/helper-plugin-utils@7.16.7
β”œβ”€ @babel/helper-remap-async-to-generator@7.16.8
β”œβ”€ @babel/helper-wrap-function@7.16.8
β”œβ”€ @babel/helpers@7.17.9
β”œβ”€ @babel/highlight@7.17.9
β”œβ”€ @babel/plugin-proposal-class-properties@7.16.7
β”œβ”€ @babel/plugin-proposal-export-default-from@7.16.7
β”œβ”€ @babel/plugin-proposal-nullish-coalescing-operator@7.16.7
β”œβ”€ @babel/plugin-proposal-optional-catch-binding@7.16.7
β”œβ”€ @babel/plugin-proposal-optional-chaining@7.16.7
β”œβ”€ @babel/plugin-syntax-class-properties@7.12.13
β”œβ”€ @babel/plugin-syntax-dynamic-import@7.8.3
β”œβ”€ @babel/plugin-syntax-export-default-from@7.16.7
β”œβ”€ @babel/plugin-syntax-flow@7.16.7
β”œβ”€ @babel/plugin-syntax-jsx@7.16.7
β”œβ”€ @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.17.10
β”œβ”€ @babel/plugin-transform-async-to-generator@7.16.8
β”œβ”€ @babel/plugin-transform-block-scoped-functions@7.16.7
β”œβ”€ @babel/plugin-transform-exponentiation-operator@7.16.7
β”œβ”€ @babel/plugin-transform-flow-strip-types@7.16.7
β”œβ”€ @babel/plugin-transform-member-expression-literals@7.16.7
β”œβ”€ @babel/plugin-transform-modules-commonjs@7.17.9
β”œβ”€ @babel/plugin-transform-object-assign@7.16.7
β”œβ”€ @babel/plugin-transform-object-super@7.16.7
β”œβ”€ @babel/plugin-transform-parameters@7.16.7
β”œβ”€ @babel/plugin-transform-property-literals@7.16.7
β”œβ”€ @babel/plugin-transform-react-jsx-self@7.16.7
β”œβ”€ @babel/plugin-transform-react-jsx-source@7.16.7
β”œβ”€ @babel/plugin-transform-regenerator@7.17.9
β”œβ”€ @babel/plugin-transform-runtime@7.17.10
β”œβ”€ @babel/plugin-transform-sticky-regex@7.16.7
β”œβ”€ @babel/plugin-transform-typescript@7.16.8
β”œβ”€ @babel/plugin-transform-unicode-regex@7.16.7
β”œβ”€ @babel/preset-flow@7.16.7
β”œβ”€ @babel/preset-typescript@7.16.7
β”œβ”€ @babel/register@7.17.7
β”œβ”€ @babel/runtime@7.17.9
β”œβ”€ @babel/traverse@7.17.10
β”œβ”€ @hapi/topo@5.1.0
β”œβ”€ @jest/create-cache-key-function@27.5.1
β”œβ”€ @jridgewell/resolve-uri@3.0.7
β”œβ”€ @jridgewell/set-array@1.1.1
β”œβ”€ @jridgewell/trace-mapping@0.3.13
β”œβ”€ @react-native-community/cli-hermes@6.3.0
β”œβ”€ @react-native-community/cli-platform-android@7.0.1
β”œβ”€ @react-native-community/cli-platform-ios@7.0.1
β”œβ”€ @react-native-community/cli-plugin-metro@7.0.3
β”œβ”€ @react-native-community/cli-types@6.0.0
β”œβ”€ @react-native-community/cli@7.0.3
β”œβ”€ @react-native/assets@1.0.0
β”œβ”€ @react-native/normalize-color@2.0.0
β”œβ”€ @react-native/polyfills@2.0.0
β”œβ”€ @sideway/address@4.1.4
β”œβ”€ @sideway/formula@3.0.0
β”œβ”€ @sideway/pinpoint@2.0.0
β”œβ”€ @types/graceful-fs@4.1.5
β”œβ”€ @types/istanbul-lib-coverage@2.0.4
β”œβ”€ @types/istanbul-lib-report@3.0.0
β”œβ”€ @types/yargs@16.0.4
β”œβ”€ abort-controller@3.0.0
β”œβ”€ accepts@1.3.8
β”œβ”€ anser@1.4.10
β”œβ”€ ansi-fragments@0.2.1
β”œβ”€ ansi-regex@5.0.1
β”œβ”€ anymatch@3.1.2
β”œβ”€ argparse@1.0.10
β”œβ”€ arr-flatten@1.1.0
β”œβ”€ array-filter@0.0.1
β”œβ”€ array-map@0.0.0
β”œβ”€ array-reduce@0.0.0
β”œβ”€ asap@2.0.6
β”œβ”€ assign-symbols@1.0.0
β”œβ”€ ast-types@0.14.2
β”œβ”€ astral-regex@1.0.0
β”œβ”€ async-limiter@1.0.1
β”œβ”€ async@2.6.4
β”œβ”€ atob@2.1.2
β”œβ”€ babel-core@7.0.0-bridge.0
β”œβ”€ babel-plugin-dynamic-import-node@2.3.3
β”œβ”€ babel-plugin-polyfill-corejs2@0.3.1
β”œβ”€ babel-plugin-polyfill-corejs3@0.5.2
β”œβ”€ babel-plugin-polyfill-regenerator@0.3.1
β”œβ”€ babel-plugin-syntax-trailing-function-commas@7.0.0-beta.0
β”œβ”€ balanced-match@1.0.2
β”œβ”€ base@0.11.2
β”œβ”€ base64-js@1.5.1
β”œβ”€ big-integer@1.6.51
β”œβ”€ bl@4.1.0
β”œβ”€ bplist-creator@0.1.0
β”œβ”€ bplist-parser@0.3.1
β”œβ”€ brace-expansion@1.1.11
β”œβ”€ braces@2.3.2
β”œβ”€ browserslist@4.20.3
β”œβ”€ bser@2.1.1
β”œβ”€ buffer-from@1.1.2
β”œβ”€ buffer@5.7.1
β”œβ”€ bytes@3.0.0
β”œβ”€ cache-base@1.0.1
β”œβ”€ call-bind@1.0.2
β”œβ”€ caller-callsite@2.0.0
β”œβ”€ caller-path@2.0.0
β”œβ”€ callsites@2.0.0
β”œβ”€ camelcase@5.3.1
β”œβ”€ caniuse-lite@1.0.30001341
β”œβ”€ ci-info@2.0.0
β”œβ”€ class-utils@0.3.6
β”œβ”€ cli-cursor@2.1.0
β”œβ”€ cli-spinners@2.6.1
β”œβ”€ cliui@6.0.0
β”œβ”€ clone-deep@4.0.1
β”œβ”€ clone@1.0.4
β”œβ”€ collection-visit@1.0.0
β”œβ”€ color-convert@2.0.1
β”œβ”€ color-name@1.1.4
β”œβ”€ colorette@1.4.0
β”œβ”€ command-exists@1.2.9
β”œβ”€ commander@2.20.3
β”œβ”€ commondir@1.0.1
β”œβ”€ compressible@2.0.18
β”œβ”€ compression@1.7.4
β”œβ”€ concat-map@0.0.1
β”œβ”€ convert-source-map@1.8.0
β”œβ”€ copy-descriptor@0.1.1
β”œβ”€ core-js-compat@3.22.5
β”œβ”€ core-util-is@1.0.3
β”œβ”€ cosmiconfig@5.2.1
β”œβ”€ cross-spawn@6.0.5
β”œβ”€ dayjs@1.11.2
β”œβ”€ debug@2.6.9
β”œβ”€ decode-uri-component@0.2.0
β”œβ”€ deepmerge@3.3.0
β”œβ”€ defaults@1.0.3
β”œβ”€ define-properties@1.1.4
β”œβ”€ denodeify@1.2.1
β”œβ”€ deprecated-react-native-prop-types@2.3.0
β”œβ”€ destroy@1.2.0
β”œβ”€ electron-to-chromium@1.4.137
β”œβ”€ emoji-regex@8.0.0
β”œβ”€ end-of-stream@1.4.4
β”œβ”€ envinfo@7.8.1
β”œβ”€ error-ex@1.3.2
β”œβ”€ error-stack-parser@2.0.7
β”œβ”€ errorhandler@1.5.1
β”œβ”€ escalade@3.1.1
β”œβ”€ escape-string-regexp@1.0.5
β”œβ”€ esprima@4.0.1
β”œβ”€ etag@1.8.1
β”œβ”€ event-target-shim@5.0.1
β”œβ”€ expand-brackets@2.1.4
β”œβ”€ extglob@2.0.4
β”œβ”€ fb-watchman@2.0.1
β”œβ”€ fill-range@4.0.0
β”œβ”€ finalhandler@1.1.2
β”œβ”€ find-cache-dir@2.1.0
β”œβ”€ flow-parser@0.121.0
β”œβ”€ for-in@1.0.2
β”œβ”€ fresh@0.5.2
β”œβ”€ fs.realpath@1.0.0
β”œβ”€ fsevents@2.3.2
β”œβ”€ gensync@1.0.0-beta.2
β”œβ”€ get-caller-file@2.0.5
β”œβ”€ get-intrinsic@1.1.1
β”œβ”€ get-stream@4.1.0
β”œβ”€ get-value@2.0.6
β”œβ”€ has-property-descriptors@1.0.0
β”œβ”€ has-value@1.0.0
β”œβ”€ hermes-engine@0.11.0
β”œβ”€ hermes-estree@0.5.0
β”œβ”€ hermes-profile-transformer@0.0.6
β”œβ”€ http-errors@2.0.0
β”œβ”€ ieee754@1.2.1
β”œβ”€ image-size@0.6.3
β”œβ”€ import-fresh@2.0.0
β”œβ”€ imurmurhash@0.1.4
β”œβ”€ inflight@1.0.6
β”œβ”€ inherits@2.0.4
β”œβ”€ ip@1.1.8
β”œβ”€ is-accessor-descriptor@1.0.0
β”œβ”€ is-arrayish@0.2.1
β”œβ”€ is-core-module@2.9.0
β”œβ”€ is-data-descriptor@1.0.0
β”œβ”€ is-descriptor@1.0.2
β”œβ”€ is-directory@0.3.1
β”œβ”€ is-fullwidth-code-point@2.0.0
β”œβ”€ is-interactive@1.0.0
β”œβ”€ is-plain-object@2.0.4
β”œβ”€ is-stream@1.1.0
β”œβ”€ is-windows@1.0.2
β”œβ”€ is-wsl@1.1.0
β”œβ”€ isarray@1.0.0
β”œβ”€ isexe@2.0.0
β”œβ”€ jest-get-type@26.3.0
β”œβ”€ jest-regex-util@27.5.1
β”œβ”€ jest-serializer@27.5.1
β”œβ”€ jest-util@27.5.1
β”œβ”€ jest-validate@26.6.2
β”œβ”€ jest-worker@26.6.2
β”œβ”€ joi@17.6.0
β”œβ”€ js-tokens@4.0.0
β”œβ”€ jsc-android@250230.2.1
β”œβ”€ jscodeshift@0.13.1
β”œβ”€ jsesc@2.5.2
β”œβ”€ json-parse-better-errors@1.0.2
β”œβ”€ json5@2.2.1
β”œβ”€ jsonfile@4.0.0
β”œβ”€ jsonify@0.0.0
β”œβ”€ klaw@1.3.1
β”œβ”€ kleur@3.0.3
β”œβ”€ locate-path@5.0.0
β”œβ”€ lodash.debounce@4.0.8
β”œβ”€ lodash@4.17.21
β”œβ”€ log-symbols@2.2.0
β”œβ”€ loose-envify@1.4.0
β”œβ”€ make-dir@2.1.0
β”œβ”€ makeerror@1.0.12
β”œβ”€ map-visit@1.0.0
β”œβ”€ metro-config@0.67.0
β”œβ”€ metro-inspector-proxy@0.67.0
β”œβ”€ metro-minify-uglify@0.67.0
β”œβ”€ metro-react-native-babel-transformer@0.67.0
β”œβ”€ metro-transform-worker@0.67.0
β”œβ”€ micromatch@3.1.10
β”œβ”€ mime-db@1.52.0
β”œβ”€ mime-types@2.1.35
β”œβ”€ mimic-fn@1.2.0
β”œβ”€ minimatch@3.1.2
β”œβ”€ minimist@1.2.6
β”œβ”€ mixin-deep@1.3.2
β”œβ”€ ms@2.0.0
β”œβ”€ nanomatch@1.2.13
β”œβ”€ negotiator@0.6.3
β”œβ”€ neo-async@2.6.2
β”œβ”€ nice-try@1.0.5
β”œβ”€ nocache@2.1.0
β”œβ”€ node-dir@0.1.17
β”œβ”€ node-fetch@2.6.7
β”œβ”€ node-int64@0.4.0
β”œβ”€ node-releases@2.0.4
β”œβ”€ node-stream-zip@1.15.0
β”œβ”€ normalize-path@3.0.0
β”œβ”€ npm-run-path@2.0.2
β”œβ”€ ob1@0.67.0
β”œβ”€ object-copy@0.1.0
β”œβ”€ object.assign@4.1.2
β”œβ”€ on-finished@2.4.1
β”œβ”€ on-headers@1.0.2
β”œβ”€ once@1.4.0
β”œβ”€ onetime@2.0.1
β”œβ”€ os-tmpdir@1.0.2
β”œβ”€ p-finally@1.0.0
β”œβ”€ p-limit@2.3.0
β”œβ”€ p-locate@4.1.0
β”œβ”€ p-try@2.2.0
β”œβ”€ parse-json@4.0.0
β”œβ”€ pascalcase@0.1.1
β”œβ”€ path-exists@4.0.0
β”œβ”€ path-is-absolute@1.0.1
β”œβ”€ path-key@2.0.1
β”œβ”€ path-parse@1.0.7
β”œβ”€ picocolors@1.0.0
β”œβ”€ picomatch@2.3.1
β”œβ”€ pify@4.0.1
β”œβ”€ pirates@4.0.5
β”œβ”€ pkg-dir@3.0.0
β”œβ”€ plist@3.0.5
β”œβ”€ posix-character-classes@0.1.1
β”œβ”€ process-nextick-args@2.0.1
β”œβ”€ promise@8.1.0
β”œβ”€ prompts@2.4.2
β”œβ”€ prop-types@15.8.1
β”œβ”€ pump@3.0.0
β”œβ”€ range-parser@1.2.1
β”œβ”€ react-devtools-core@4.24.6
β”œβ”€ react-is@17.0.2
β”œβ”€ react-native-codegen@0.0.17
β”œβ”€ react-native-gradle-plugin@0.0.6
β”œβ”€ react-native@0.68.2
β”œβ”€ react-shallow-renderer@16.14.1
β”œβ”€ readable-stream@3.6.0
β”œβ”€ readline@1.3.0
β”œβ”€ recast@0.20.5
β”œβ”€ regenerate-unicode-properties@10.0.1
β”œβ”€ regenerator-runtime@0.13.9
β”œβ”€ regenerator-transform@0.15.0
β”œβ”€ regexpu-core@5.0.1
β”œβ”€ regjsgen@0.6.0
β”œβ”€ regjsparser@0.8.4
β”œβ”€ repeat-element@1.1.4
β”œβ”€ require-directory@2.1.1
β”œβ”€ require-main-filename@2.0.0
β”œβ”€ resolve-from@3.0.0
β”œβ”€ resolve-url@0.2.1
β”œβ”€ resolve@1.22.0
β”œβ”€ restore-cursor@2.0.0
β”œβ”€ ret@0.1.15
β”œβ”€ safe-buffer@5.1.2
β”œβ”€ sax@1.2.4
β”œβ”€ scheduler@0.20.2
β”œβ”€ semver@6.3.0
β”œβ”€ send@0.18.0
β”œβ”€ serialize-error@2.1.0
β”œβ”€ set-blocking@2.0.0
β”œβ”€ set-value@2.0.1
β”œβ”€ setprototypeof@1.2.0
β”œβ”€ shallow-clone@3.0.1
β”œβ”€ shebang-command@1.2.0
β”œβ”€ shebang-regex@1.0.0
β”œβ”€ shell-quote@1.7.3
β”œβ”€ simple-plist@1.3.1
β”œβ”€ sisteransi@1.0.5
β”œβ”€ slice-ansi@2.1.0
β”œβ”€ snapdragon-node@2.1.1
β”œβ”€ snapdragon-util@3.0.1
β”œβ”€ source-map-resolve@0.5.3
β”œβ”€ source-map-support@0.5.21
β”œβ”€ source-map-url@0.4.1
β”œβ”€ split-string@3.1.0
β”œβ”€ sprintf-js@1.0.3
β”œβ”€ stackframe@1.2.1
β”œβ”€ stacktrace-parser@0.1.10
β”œβ”€ static-extend@0.1.2
β”œβ”€ stream-buffers@2.2.0
β”œβ”€ string_decoder@1.3.0
β”œβ”€ string-width@4.2.3
β”œβ”€ strip-eof@1.0.0
β”œβ”€ sudo-prompt@9.2.1
β”œβ”€ supports-color@7.2.0
β”œβ”€ supports-preserve-symlinks-flag@1.0.0
β”œβ”€ temp@0.8.4
β”œβ”€ throat@5.0.0
β”œβ”€ through2@2.0.5
β”œβ”€ tmpl@1.0.5
β”œβ”€ to-fast-properties@2.0.0
β”œβ”€ to-object-path@0.3.0
β”œβ”€ to-regex-range@2.1.1
β”œβ”€ toidentifier@1.0.1
β”œβ”€ tr46@0.0.3
β”œβ”€ type-fest@0.7.1
β”œβ”€ uglify-es@3.3.9
β”œβ”€ unicode-canonical-property-names-ecmascript@2.0.0
β”œβ”€ unicode-match-property-ecmascript@2.0.0
β”œβ”€ unicode-match-property-value-ecmascript@2.0.0
β”œβ”€ unicode-property-aliases-ecmascript@2.0.0
β”œβ”€ union-value@1.0.1
β”œβ”€ universalify@0.1.2
β”œβ”€ unpipe@1.0.0
β”œβ”€ unset-value@1.0.0
β”œβ”€ urix@0.1.0
β”œβ”€ use-subscription@1.5.1
β”œβ”€ use@3.1.1
β”œβ”€ util-deprecate@1.0.2
β”œβ”€ utils-merge@1.0.1
β”œβ”€ uuid@7.0.3
β”œβ”€ vary@1.1.2
β”œβ”€ walker@1.0.8
β”œβ”€ webidl-conversions@3.0.1
β”œβ”€ whatwg-fetch@3.6.2
β”œβ”€ whatwg-url@5.0.0
β”œβ”€ which-module@2.0.0
β”œβ”€ which@1.3.1
β”œβ”€ wrap-ansi@6.2.0
β”œβ”€ write-file-atomic@2.4.3
β”œβ”€ xcode@3.0.1
β”œβ”€ xmlbuilder@9.0.7
β”œβ”€ xtend@4.0.2
β”œβ”€ y18n@4.0.3
└─ yargs-parser@18.1.3
✨  Done in 41.99s.
info Setting up new React Native app in /Users/ying/MyApp
info Fetching template react-native-template-@thecodingmachine/react-native-boilerplate...
(node:3122) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
yarn add v1.22.17
[1/4] πŸ”  Resolving packages...
warning @react-native-community/eslint-config > babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
warning babel-jest > @jest/transform > jest-haste-map > sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
warning "react-native > react-native-codegen > jscodeshift@0.13.1" has unmet peer dependency "@babel/preset-env@^7.1.6".
warning "@react-native-community/eslint-config > @typescript-eslint/eslint-plugin > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] πŸ”¨  Building fresh packages...
success Saved lockfile.
success Saved 215 new dependencies.
info Direct dependencies
β”œβ”€ @react-native-community/eslint-config@2.0.0
β”œβ”€ eslint@7.32.0
β”œβ”€ jest@26.6.3
β”œβ”€ react-native-template-@3.3.1
β”œβ”€ react-test-renderer@17.0.2
└─ react@17.0.2
info All dependencies
β”œβ”€ @babel/plugin-syntax-async-generators@7.8.4
β”œβ”€ @babel/plugin-syntax-bigint@7.8.3
β”œβ”€ @babel/plugin-syntax-import-meta@7.10.4
β”œβ”€ @babel/plugin-syntax-json-strings@7.8.3
β”œβ”€ @babel/plugin-syntax-logical-assignment-operators@7.10.4
β”œβ”€ @babel/plugin-syntax-numeric-separator@7.10.4
β”œβ”€ @babel/plugin-syntax-top-level-await@7.14.5
β”œβ”€ @bcoe/v8-coverage@0.2.3
β”œβ”€ @cnakazawa/watch@1.0.4
β”œβ”€ @eslint/eslintrc@0.4.3
β”œβ”€ @humanwhocodes/config-array@0.5.0
β”œβ”€ @humanwhocodes/object-schema@1.2.1
β”œβ”€ @istanbuljs/load-nyc-config@1.1.0
β”œβ”€ @jest/globals@26.6.2
β”œβ”€ @jest/reporters@26.6.2
β”œβ”€ @jest/test-sequencer@26.6.3
β”œβ”€ @react-native-community/eslint-config@2.0.0
β”œβ”€ @react-native-community/eslint-plugin@1.2.0
β”œβ”€ @sinonjs/commons@1.8.3
β”œβ”€ @sinonjs/fake-timers@6.0.1
β”œβ”€ @thecodingmachine/rnb-plugin-typescript@1.1.0
β”œβ”€ @tootallnate/once@1.1.2
β”œβ”€ @types/babel__core@7.1.19
β”œβ”€ @types/babel__generator@7.6.4
β”œβ”€ @types/babel__template@7.4.1
β”œβ”€ @types/babel__traverse@7.17.1
β”œβ”€ @types/eslint-visitor-keys@1.0.0
β”œβ”€ @types/json-schema@7.0.11
β”œβ”€ @types/normalize-package-data@2.4.1
β”œβ”€ @types/prettier@2.6.1
β”œβ”€ @types/stack-utils@2.0.1
β”œβ”€ @typescript-eslint/eslint-plugin@3.10.1
β”œβ”€ @typescript-eslint/parser@3.10.1
β”œβ”€ @typescript-eslint/visitor-keys@3.10.1
β”œβ”€ abab@2.0.6
β”œβ”€ acorn-globals@6.0.0
β”œβ”€ acorn-jsx@5.3.2
β”œβ”€ acorn-walk@7.2.0
β”œβ”€ acorn@7.4.1
β”œβ”€ ajv@6.12.6
β”œβ”€ ansi-colors@4.1.1
β”œβ”€ array.prototype.flatmap@1.3.0
β”œβ”€ astral-regex@2.0.0
β”œβ”€ asynckit@0.4.0
β”œβ”€ babel-eslint@10.1.0
β”œβ”€ babel-plugin-jest-hoist@26.6.2
β”œβ”€ babel-preset-current-node-syntax@1.0.1
β”œβ”€ babel-preset-jest@26.6.2
β”œβ”€ browser-process-hrtime@1.0.0
β”œβ”€ capture-exit@2.0.0
β”œβ”€ char-regex@1.0.2
β”œβ”€ cjs-module-lexer@0.6.0
β”œβ”€ co@4.6.0
β”œβ”€ combined-stream@1.0.8
β”œβ”€ cross-spawn@7.0.3
β”œβ”€ cssom@0.4.4
β”œβ”€ cssstyle@2.3.0
β”œβ”€ data-urls@2.0.0
β”œβ”€ decimal.js@10.3.1
β”œβ”€ deep-is@0.1.4
β”œβ”€ delayed-stream@1.0.0
β”œβ”€ detect-newline@3.1.0
β”œβ”€ diff-sequences@26.6.2
β”œβ”€ doctrine@3.0.0
β”œβ”€ domexception@2.0.1
β”œβ”€ emittery@0.7.2
β”œβ”€ enquirer@2.3.6
β”œβ”€ es-shim-unscopables@1.0.0
β”œβ”€ es-to-primitive@1.2.1
β”œβ”€ escodegen@2.0.0
β”œβ”€ eslint-config-prettier@6.15.0
β”œβ”€ eslint-plugin-eslint-comments@3.2.0
β”œβ”€ eslint-plugin-flowtype@2.50.3
β”œβ”€ eslint-plugin-jest@22.4.1
β”œβ”€ eslint-plugin-prettier@3.1.2
β”œβ”€ eslint-plugin-react-hooks@4.5.0
β”œβ”€ eslint-plugin-react-native-globals@0.1.2
β”œβ”€ eslint-plugin-react-native@3.11.0
β”œβ”€ eslint-plugin-react@7.29.4
β”œβ”€ eslint-scope@5.1.1
β”œβ”€ eslint-utils@2.1.0
β”œβ”€ eslint-visitor-keys@1.3.0
β”œβ”€ eslint@7.32.0
β”œβ”€ espree@7.3.1
β”œβ”€ esquery@1.4.0
β”œβ”€ esrecurse@4.3.0
β”œβ”€ fast-diff@1.2.0
β”œβ”€ fast-levenshtein@2.0.6
β”œβ”€ file-entry-cache@6.0.1
β”œβ”€ flat-cache@3.0.4
β”œβ”€ flatted@3.2.5
β”œβ”€ form-data@3.0.1
β”œβ”€ function.prototype.name@1.1.5
β”œβ”€ get-package-type@0.1.0
β”œβ”€ get-stdin@6.0.0
β”œβ”€ get-symbol-description@1.0.0
β”œβ”€ glob-parent@5.1.2
β”œβ”€ growly@1.3.0
β”œβ”€ has-bigints@1.0.2
β”œβ”€ hosted-git-info@2.8.9
β”œβ”€ html-encoding-sniffer@2.0.1
β”œβ”€ html-escaper@2.0.2
β”œβ”€ http-proxy-agent@4.0.1
β”œβ”€ https-proxy-agent@5.0.1
β”œβ”€ human-signals@1.1.1
β”œβ”€ iconv-lite@0.4.24
β”œβ”€ import-fresh@3.3.0
β”œβ”€ is-bigint@1.0.4
β”œβ”€ is-boolean-object@1.1.2
β”œβ”€ is-callable@1.2.4
β”œβ”€ is-date-object@1.0.5
β”œβ”€ is-docker@2.2.1
β”œβ”€ is-extglob@2.1.1
β”œβ”€ is-generator-fn@2.1.0
β”œβ”€ is-negative-zero@2.0.2
β”œβ”€ is-number-object@1.0.7
β”œβ”€ is-potential-custom-element-name@1.0.1
β”œβ”€ is-regex@1.1.4
β”œβ”€ is-shared-array-buffer@1.0.2
β”œβ”€ is-string@1.0.7
β”œβ”€ is-symbol@1.0.4
β”œβ”€ is-weakref@1.0.2
β”œβ”€ istanbul-lib-instrument@5.2.0
β”œβ”€ istanbul-lib-source-maps@4.0.1
β”œβ”€ istanbul-reports@3.1.4
β”œβ”€ jest-changed-files@26.6.2
β”œβ”€ jest-cli@26.6.3
β”œβ”€ jest-docblock@26.0.0
β”œβ”€ jest-each@26.6.2
β”œβ”€ jest-environment-jsdom@26.6.2
β”œβ”€ jest-environment-node@26.6.2
β”œβ”€ jest-jasmine2@26.6.3
β”œβ”€ jest-leak-detector@26.6.2
β”œβ”€ jest-pnp-resolver@1.2.2
β”œβ”€ jest-resolve-dependencies@26.6.3
β”œβ”€ jest-serializer@26.6.2
β”œβ”€ jest-watcher@26.6.2
β”œβ”€ jest@26.6.3
β”œβ”€ jsdom@16.7.0
β”œβ”€ json-parse-even-better-errors@2.3.1
β”œβ”€ json-schema-traverse@0.4.1
β”œβ”€ json-stable-stringify-without-jsonify@1.0.1
β”œβ”€ jsx-ast-utils@3.3.0
β”œβ”€ kleur@4.1.4
β”œβ”€ lines-and-columns@1.2.4
β”œβ”€ lodash.merge@4.6.2
β”œβ”€ lodash.truncate@4.4.2
β”œβ”€ lru-cache@6.0.0
β”œβ”€ node-notifier@8.0.2
β”œβ”€ normalize-package-data@2.5.0
β”œβ”€ nwsapi@2.2.0
β”œβ”€ object-inspect@1.12.0
β”œβ”€ object.entries@1.1.5
β”œβ”€ object.fromentries@2.0.5
β”œβ”€ object.hasown@1.1.1
β”œβ”€ object.values@1.1.5
β”œβ”€ optionator@0.9.1
β”œβ”€ p-each-series@2.2.0
β”œβ”€ parent-module@1.0.1
β”œβ”€ parse5@6.0.1
β”œβ”€ pkg-dir@4.2.0
β”œβ”€ prettier-linter-helpers@1.0.0
β”œβ”€ prettier@2.6.2
β”œβ”€ progress@2.0.3
β”œβ”€ psl@1.8.0
β”œβ”€ react-native-template-@3.3.1
β”œβ”€ react-test-renderer@17.0.2
β”œβ”€ react@17.0.2
β”œβ”€ read-pkg-up@7.0.1
β”œβ”€ read-pkg@5.2.0
β”œβ”€ regexpp@3.2.0
β”œβ”€ remove-trailing-separator@1.1.0
β”œβ”€ require-from-string@2.0.2
β”œβ”€ resolve-cwd@3.0.0
β”œβ”€ rsvp@4.8.5
β”œβ”€ safer-buffer@2.1.2
β”œβ”€ sane@4.1.0
β”œβ”€ saxes@5.0.1
β”œβ”€ shebang-command@2.0.0
β”œβ”€ shebang-regex@3.0.0
β”œβ”€ shellwords@0.1.1
β”œβ”€ slice-ansi@4.0.0
β”œβ”€ spdx-correct@3.1.1
β”œβ”€ spdx-exceptions@2.3.0
β”œβ”€ stack-utils@2.0.5
β”œβ”€ string.prototype.matchall@4.0.7
β”œβ”€ string.prototype.trimend@1.0.5
β”œβ”€ string.prototype.trimstart@1.0.5
β”œβ”€ strip-bom@4.0.0
β”œβ”€ strip-final-newline@2.0.0
β”œβ”€ strip-json-comments@3.1.1
β”œβ”€ supports-hyperlinks@2.2.0
β”œβ”€ symbol-tree@3.2.4
β”œβ”€ table@6.8.0
β”œβ”€ terminal-link@2.1.1
β”œβ”€ test-exclude@6.0.0
β”œβ”€ text-table@0.2.0
β”œβ”€ tough-cookie@4.0.0
β”œβ”€ tr46@2.1.0
β”œβ”€ type-detect@4.0.8
β”œβ”€ type-fest@0.20.2
β”œβ”€ typedarray-to-buffer@3.1.5
β”œβ”€ unbox-primitive@1.0.2
β”œβ”€ v8-compile-cache@2.3.0
β”œβ”€ v8-to-istanbul@7.1.2
β”œβ”€ validate-npm-package-license@3.0.4
β”œβ”€ w3c-hr-time@1.0.2
β”œβ”€ w3c-xmlserializer@2.0.0
β”œβ”€ whatwg-url@8.7.0
β”œβ”€ which-boxed-primitive@1.0.2
β”œβ”€ which@2.0.2
β”œβ”€ word-wrap@1.2.3
β”œβ”€ write-file-atomic@3.0.3
β”œβ”€ xmlchars@2.2.0
└─ yallist@4.0.0
✨  Done in 37.38s.
yarn remove v1.22.17
[1/2] πŸ—‘  Removing module react-native-template-@thecodingmachine/react-native-boilerplate...
error This module isn't specified in a package.json file.
info Visit https://yarnpkg.com/en/docs/cli/remove for documentation about this command.
warn Failed to clean up template temp files in node_modules/react-native-template-@thecodingmachine/react-native-boilerplate. This is not a critical error, you can work on your app.
/Users/ying/MyApp/node_modules/metro-hermes-compiler/src/emhermesc.js:77
          throw ex;
          ^

RuntimeError: abort(Error: ENOENT: no such file or directory, lstat '/Users/ying/MyApp/node_modules/react-native-template-@thecodingmachine/react-native-boilerplate'). Build with -s ASSERTIONS=1 for more info.
    at process.abort (/Users/ying/MyApp/node_modules/metro-hermes-compiler/src/emhermesc.js:402:15)
    at process.emit (events.js:400:28)
    at processPromiseRejections (internal/process/promises.js:245:33)
    at processTicksAndRejections (internal/process/task_queues.js:96:32)
JeremyDolle commented 2 years ago

Can you run react-native -v and send me the result please ?

liujb commented 2 years ago

Have the same problem

Maybe can solve.

JeremyDolle commented 2 years ago

@liujb I recommend to not reinstall the cli, like it's recommended in the documentation and use the npx command. Like this you will use the lastest version of the cli

GezimVeliu commented 2 years ago

+1 Same issue, but I have another issue also, which command is to create react-native-boilerplate with typescript?

JeremyDolle commented 2 years ago

@GezimVeliu what happen if you run react-native -v?

If you want to use typescript you have to run the same cmd and a prompt will be displayed.

catdieng commented 2 years ago

Hi, I have the same issue since 3 months.

Node version: v14.18.1

` √ Downloading template √ Copying template √ Processing template √ πŸ“˜ Using typescript ? (y/N)

... yes / Executing post init script Error: Sorry, an error occurred reading: ./node_modules/@thecodingmachine/rnb-plugin-typescript/template/ at onEachFiles (C:\Users\CHEIKH~1.DIE\AppData\Local\Temp\rncli-init-template-LMj3hC\node_modules\@thecodingmachine\rnb-toolbox\dist\utils.js:50:31) at async Object.plugin.lifecycle.onInstall (C:\Users\CHEIKH~1.DIE\AppData\Local\Temp\rncli-init-template-LMj3hC\node_modules\@thecodingmachine\rnb-plugin-typescript\index.js:19:3) at async RNBPlugin.apply (C:\Users\CHEIKH~1.DIE\AppData\Local\Temp\rncli-init-template-LMj3hC\node_modules\@thecodingmachine\rnb-toolbox\dist\index.js:46:21) at async applyPlugin (C:\Users\CHEIKH~1.DIE\AppData\Local\Temp\rncli-init-template-LMj3hC\node_modules\@thecodingmachine\react-native-boilerplate\template\plugins\index.js:22:3)

TheCodingMachine React-Native Boilerplate initialized with success ! `

Version latest

On which OS this issue appear on?

Desktop OS Windows 11

GezimVeliu commented 2 years ago

@JeremyDolle my version is not figurated cause haven't been installed globally, react-native -v nothing happened. But for me it worked only after installing the npx i -g @react-native-community/cli@8.0.2.

  1. npx i -g @react-native-community/cli
  2. npx react-native init bonc --template @thecodingmachine/react-native-boilerplate

Worked

JeremyDolle commented 2 years ago

Ok...I don't know why because if you don't have the react-native-cli installed globally and run npx react-native init, it will install the right version of the CLI based on the react native version of the template. It's well explained in the documentation. A lot of issues can appears if you don't use the right version of the CLI... by installing it globally you will have to check the cli version before using a template and re-install the right CLI version compatible with the react-native version... I don't think it's the easiest way to maintain projects.

What node version do you use ?

GezimVeliu commented 2 years ago

@JeremyDolle I appreciate your fast response.

C:\Users\Gezim>node -v v14.17.6

C:\Users\Gezim>npm -v 6.14.15

C:\Users\Gezim>react-native --version 8.0.2

Now for me is everything okay, it is working

jeremyspritelyco commented 2 years ago

this template still fail to creat a new project in Aug 2022. here is my error:

npx react-native init ZetaChatApp --template @thecodingmachine/react-native-boilerplate

               ######                ######               
             ###     ####        ####     ###             
            ##          ###    ###          ##            
            ##             ####             ##            
            ##             ####             ##            
            ##           ##    ##           ##            
            ##         ###      ###         ##            
             ##  ########################  ##             
          ######    ###            ###    ######          
      ###     ##    ##              ##    ##     ###      
   ###         ## ###      ####      ### ##         ###   
  ##           ####      ########      ####           ##  
 ##             ###     ##########     ###             ## 
  ##           ####      ########      ####           ##  
   ###         ## ###      ####      ### ##         ###   
      ###     ##    ##              ##    ##     ###      
          ######    ###            ###    ######          
             ##  ########################  ##             
            ##         ###      ###         ##            
            ##           ##    ##           ##            
            ##             ####             ##            
            ##             ####             ##            
            ##          ###    ###          ##            
             ###     ####        ####     ###             
               ######                ######               

                  Welcome to React Native!                
                 Learn once, write anywhere               

βœ” Downloading template
βœ” Copying template
βœ” Processing template
β„Ή Executing post init script 
βœ” πŸ“˜ Using typescript ? (y/N) 

 … yes

Error: Command failed: yarn remove @thecodingmachine/rnb-plugin-typescript
error This module isn't specified in a package.json file.

    at checkExecSyncError (node:child_process:828:11)
    at execSync (node:child_process:899:15)
    at RNBPlugin.apply (/private/var/folders/5t/pyldrlys2bx3gltdbnh042v80000gn/T/rncli-init-template-dnbD6K/node_modules/@thecodingmachine/rnb-toolbox/dist/index.js:48:56)
    at async applyPlugin (/private/var/folders/5t/pyldrlys2bx3gltdbnh042v80000gn/T/rncli-init-template-dnbD6K/node_modules/@thecodingmachine/react-native-boilerplate/template/plugins/index.js:22:3) {
  status: 1,
  signal: null,
  output: [
    null,
    <Buffer 79 61 72 6e 20 72 65 6d 6f 76 65 20 76 31 2e 32 32 2e 31 39 0a 5b 31 2f 32 5d 20 52 65 6d 6f 76 69 6e 67 20 6d 6f 64 75 6c 65 20 40 74 68 65 63 6f 64 ... 124 more bytes>,
    <Buffer 65 72 72 6f 72 20 54 68 69 73 20 6d 6f 64 75 6c 65 20 69 73 6e 27 74 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 61 20 70 61 63 6b 61 67 65 2e 6a 73 6f ... 8 more bytes>
  ],
  pid: 9430,
  stdout: <Buffer 79 61 72 6e 20 72 65 6d 6f 76 65 20 76 31 2e 32 32 2e 31 39 0a 5b 31 2f 32 5d 20 52 65 6d 6f 76 69 6e 67 20 6d 6f 64 75 6c 65 20 40 74 68 65 63 6f 64 ... 124 more bytes>,
  stderr: <Buffer 65 72 72 6f 72 20 54 68 69 73 20 6d 6f 64 75 6c 65 20 69 73 6e 27 74 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 61 20 70 61 63 6b 61 67 65 2e 6a 73 6f ... 8 more bytes>
}

TheCodingMachine React-Native Boilerplate initialized with success ! πŸš€

                                                                    .-`    `::  
 `/////////////     `/shhhy+-   ://.        /sy/                   /ss/   :NMN: 
 `sssssyhhhyhhy:` `yMMMMNNMMMd. osss:     `hMMMh-    .-`         `+ss:   +MMm/. 
      :MMM+----. `mMMm+:-`.oo/` osssyo`  `dMMMMh-   ohhh-       `oyy+-  sMMd/.  
      :MMM+`     oMMN/-         osssyhs`.mMMMMMh-   -hds`      .syy+- `hMMh:`   
      :MMM+`     hMMd:          oss-ohhhMMMhdMMh-    `.       +NNm/. .dMMy:`    
      :MMM+`     oMMN/          oss-`shdMMd:dMMh-    :-`     sMMd/. -NMMo-      
      :MMM+`     `mMMm/`  `/+:. oss- `sdMd:.hMMh-   hMys-  `hMMh:` -hdy-`       
      :MMM+`      `yMMMMdssss+  oss.  `oh/- hMMh-   -hyo:  dMMs:` -ss+`         
      .oys:`        .+yhyo/-    -::`    ``  -syo-     ..`  +mo-   `//           
        ``             ```                    ``            `.                  

- πŸ“š If you need to read more about this boilerplate : https://thecodingmachine.github.io/react-native-boilerplate/
- πŸ€• If you have some troubles : https://github.com/thecodingmachine/react-native-boilerplate/issues
- ⭐ If you love this boilerplate, give us a star, you will be a ray of sunshine in our lives :) https://github.com/thecodingmachine/react-native-boilerplate
βœ– Installing CocoaPods dependencies (this may take a few minutes)
βœ– Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./ZetaChatApp/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
ha-family commented 2 years ago

@jeremyspritelyco did you fix it? i have same problem. and i can't get latest version of boilerplate, i alway got 3.3.0

ha-family commented 2 years ago

my env is ➜ Projects git:(master) βœ— npm -v 8.13.2 ➜ Projects git:(master) βœ— node -v v16.15.0 ➜ Projects git:(master) βœ— react-native --version 8.0.2

can anyone help me to get lastest boilerplate?

JeremyDolle commented 2 years ago

this template still fail to creat a new project in Aug 2022. here is my error:

npx react-native init ZetaChatApp --template @thecodingmachine/react-native-boilerplate

               ######                ######               
             ###     ####        ####     ###             
            ##          ###    ###          ##            
            ##             ####             ##            
            ##             ####             ##            
            ##           ##    ##           ##            
            ##         ###      ###         ##            
             ##  ########################  ##             
          ######    ###            ###    ######          
      ###     ##    ##              ##    ##     ###      
   ###         ## ###      ####      ### ##         ###   
  ##           ####      ########      ####           ##  
 ##             ###     ##########     ###             ## 
  ##           ####      ########      ####           ##  
   ###         ## ###      ####      ### ##         ###   
      ###     ##    ##              ##    ##     ###      
          ######    ###            ###    ######          
             ##  ########################  ##             
            ##         ###      ###         ##            
            ##           ##    ##           ##            
            ##             ####             ##            
            ##             ####             ##            
            ##          ###    ###          ##            
             ###     ####        ####     ###             
               ######                ######               

                  Welcome to React Native!                
                 Learn once, write anywhere               

βœ” Downloading template
βœ” Copying template
βœ” Processing template
β„Ή Executing post init script 
βœ” πŸ“˜ Using typescript ? (y/N) 

 … yes

Error: Command failed: yarn remove @thecodingmachine/rnb-plugin-typescript
error This module isn't specified in a package.json file.

    at checkExecSyncError (node:child_process:828:11)
    at execSync (node:child_process:899:15)
    at RNBPlugin.apply (/private/var/folders/5t/pyldrlys2bx3gltdbnh042v80000gn/T/rncli-init-template-dnbD6K/node_modules/@thecodingmachine/rnb-toolbox/dist/index.js:48:56)
    at async applyPlugin (/private/var/folders/5t/pyldrlys2bx3gltdbnh042v80000gn/T/rncli-init-template-dnbD6K/node_modules/@thecodingmachine/react-native-boilerplate/template/plugins/index.js:22:3) {
  status: 1,
  signal: null,
  output: [
    null,
    <Buffer 79 61 72 6e 20 72 65 6d 6f 76 65 20 76 31 2e 32 32 2e 31 39 0a 5b 31 2f 32 5d 20 52 65 6d 6f 76 69 6e 67 20 6d 6f 64 75 6c 65 20 40 74 68 65 63 6f 64 ... 124 more bytes>,
    <Buffer 65 72 72 6f 72 20 54 68 69 73 20 6d 6f 64 75 6c 65 20 69 73 6e 27 74 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 61 20 70 61 63 6b 61 67 65 2e 6a 73 6f ... 8 more bytes>
  ],
  pid: 9430,
  stdout: <Buffer 79 61 72 6e 20 72 65 6d 6f 76 65 20 76 31 2e 32 32 2e 31 39 0a 5b 31 2f 32 5d 20 52 65 6d 6f 76 69 6e 67 20 6d 6f 64 75 6c 65 20 40 74 68 65 63 6f 64 ... 124 more bytes>,
  stderr: <Buffer 65 72 72 6f 72 20 54 68 69 73 20 6d 6f 64 75 6c 65 20 69 73 6e 27 74 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 61 20 70 61 63 6b 61 67 65 2e 6a 73 6f ... 8 more bytes>
}

TheCodingMachine React-Native Boilerplate initialized with success ! πŸš€

                                                                    .-`    `::  
 `/////////////     `/shhhy+-   ://.        /sy/                   /ss/   :NMN: 
 `sssssyhhhyhhy:` `yMMMMNNMMMd. osss:     `hMMMh-    .-`         `+ss:   +MMm/. 
      :MMM+----. `mMMm+:-`.oo/` osssyo`  `dMMMMh-   ohhh-       `oyy+-  sMMd/.  
      :MMM+`     oMMN/-         osssyhs`.mMMMMMh-   -hds`      .syy+- `hMMh:`   
      :MMM+`     hMMd:          oss-ohhhMMMhdMMh-    `.       +NNm/. .dMMy:`    
      :MMM+`     oMMN/          oss-`shdMMd:dMMh-    :-`     sMMd/. -NMMo-      
      :MMM+`     `mMMm/`  `/+:. oss- `sdMd:.hMMh-   hMys-  `hMMh:` -hdy-`       
      :MMM+`      `yMMMMdssss+  oss.  `oh/- hMMh-   -hyo:  dMMs:` -ss+`         
      .oys:`        .+yhyo/-    -::`    ``  -syo-     ..`  +mo-   `//           
        ``             ```                    ``            `.                  

- πŸ“š If you need to read more about this boilerplate : https://thecodingmachine.github.io/react-native-boilerplate/
- πŸ€• If you have some troubles : https://github.com/thecodingmachine/react-native-boilerplate/issues
- ⭐ If you love this boilerplate, give us a star, you will be a ray of sunshine in our lives :) https://github.com/thecodingmachine/react-native-boilerplate
βœ– Installing CocoaPods dependencies (this may take a few minutes)
βœ– Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./ZetaChatApp/ios && pod install".
CocoaPods documentation: https://cocoapods.org/

Hi @jeremyspritelyco, for the Error: Command failed: yarn remove @thecodingmachine/rnb-plugin-typescript I know about it and I am working on it. Btw, it's not a blocking error, it is at the end of the typescript plugin so the react-native-cli script resume when my script fail.

The cocoaPods dependencies error is located in the react native cli not in the boilerplate. Like it's said you need to run it locally with pod install.

kabus202 commented 2 years ago

@JeremyDolle any updates?

JeremyDolle commented 1 year ago

Can you try it again ? It should be fixed. Feel free to reopen if it's still fail

mtalhagaoglu commented 1 year ago

Hi, I have similar problems related to the post-init.script.js file. Please see below for cli output:

`βœ” Downloading template βœ” Copying template βœ” Processing template β„Ή Executing post init script βœ” πŸ“˜ Using typescript ? … no

πŸ“¦ Loading the build tool... 🧱 Building the javascript source... node:internal/errors:865 const err = new Error(message); ^

Error: Command failed: npx tsc --jsx react-native --module ESNext -t esnext --outDir js --noEmit false at checkExecSyncError (node:child_process:885:11) at execSync (node:child_process:957:15) at /private/var/folders/vq/7vg_9zrd2hj46q206r54__vh0000gn/T/rncli-init-template-CfZIhn/node_modules/@thecodingmachine/react-native-boilerplate/template/plugins/compile-js/plugin.js:13:15 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { status: 2, signal: null, output: [ null, Buffer(181) [Uint8Array] [ 101, 114, 114, 111, 114, 32, 84, 83, 50, 54, 56, 56, 58, 32, 67, 97, 110, 110, 111, 116, 32, 102, 105, 110, 100, 32, 116, 121, 112, 101, 32, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 32, 102, 105, 108, 101, 32, 102, 111, 114, 32, 39, 114, 101, 97, 99, 116, 45, 110, 97, 116, 105, 118, 101, 39, 46, 10, 32, 32, 84, 104, 101, 32, 102, 105, 108, 101, 32, 105, 115, 32, 105, 110, 32, 116, 104, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 98, 101, 99, 97, ... 81 more items ], Buffer(0) [Uint8Array] [] ], pid: 2641, stdout: Buffer(181) [Uint8Array] [ 101, 114, 114, 111, 114, 32, 84, 83, 50, 54, 56, 56, 58, 32, 67, 97, 110, 110, 111, 116, 32, 102, 105, 110, 100, 32, 116, 121, 112, 101, 32, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 32, 102, 105, 108, 101, 32, 102, 111, 114, 32, 39, 114, 101, 97, 99, 116, 45, 110, 97, 116, 105, 118, 101, 39, 46, 10, 32, 32, 84, 104, 101, 32, 102, 105, 108, 101, 32, 105, 115, 32, 105, 110, 32, 116, 104, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 98, 101, 99, 97, ... 81 more items ], stderr: Buffer(0) [Uint8Array] [] }

Node.js v20.4.0 βœ– Processing template error Command failed with exit code 1: /var/folders/vq/7vg_9zrd2hj46q206r54vh0000gn/T/rncli-init-template-CfZIhn/node_modules/@thecodingmachine/react-native-boilerplate/post-init.script.js. Error: Command failed with exit code 1: /var/folders/vq/7vg_9zrd2hj46q206r54vh0000gn/T/rncli-init-template-CfZIhn/node_modules/@thecodingmachine/react-native-boilerplate/post-init.script.js at makeError (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/execa/lib/error.js:60:11) at handlePromise (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/execa/index.js:118:26) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async createFromTemplate (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:117:7) at async Object.initialize [as func] (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:184:3) at async Command.handleAction (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js:109:9) info Run CLI with --verbose flag for more details. `

gregoriusdevon commented 1 year ago

Hi, I have similar problems related to the post-init.script.js file. Please see below for cli output:

`βœ” Downloading template βœ” Copying template βœ” Processing template β„Ή Executing post init script βœ” πŸ“˜ Using typescript ? … no

πŸ“¦ Loading the build tool... 🧱 Building the javascript source... node:internal/errors:865 const err = new Error(message); ^

Error: Command failed: npx tsc --jsx react-native --module ESNext -t esnext --outDir js --noEmit false at checkExecSyncError (node:child_process:885:11) at execSync (node:child_process:957:15) at /private/var/folders/vq/7vg_9zrd2hj46q206r54__vh0000gn/T/rncli-init-template-CfZIhn/node_modules/@thecodingmachine/react-native-boilerplate/template/plugins/compile-js/plugin.js:13:15 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { status: 2, signal: null, output: [ null, Buffer(181) [Uint8Array] [ 101, 114, 114, 111, 114, 32, 84, 83, 50, 54, 56, 56, 58, 32, 67, 97, 110, 110, 111, 116, 32, 102, 105, 110, 100, 32, 116, 121, 112, 101, 32, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 32, 102, 105, 108, 101, 32, 102, 111, 114, 32, 39, 114, 101, 97, 99, 116, 45, 110, 97, 116, 105, 118, 101, 39, 46, 10, 32, 32, 84, 104, 101, 32, 102, 105, 108, 101, 32, 105, 115, 32, 105, 110, 32, 116, 104, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 98, 101, 99, 97, ... 81 more items ], Buffer(0) [Uint8Array] [] ], pid: 2641, stdout: Buffer(181) [Uint8Array] [ 101, 114, 114, 111, 114, 32, 84, 83, 50, 54, 56, 56, 58, 32, 67, 97, 110, 110, 111, 116, 32, 102, 105, 110, 100, 32, 116, 121, 112, 101, 32, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 32, 102, 105, 108, 101, 32, 102, 111, 114, 32, 39, 114, 101, 97, 99, 116, 45, 110, 97, 116, 105, 118, 101, 39, 46, 10, 32, 32, 84, 104, 101, 32, 102, 105, 108, 101, 32, 105, 115, 32, 105, 110, 32, 116, 104, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 98, 101, 99, 97, ... 81 more items ], stderr: Buffer(0) [Uint8Array] [] }

Node.js v20.4.0 βœ– Processing template error Command failed with exit code 1: /var/folders/vq/7vg_9zrd2hj46q206r54vh0000gn/T/rncli-init-template-CfZIhn/node_modules/@thecodingmachine/react-native-boilerplate/post-init.script.js. Error: Command failed with exit code 1: /var/folders/vq/7vg_9zrd2hj46q206r54vh0000gn/T/rncli-init-template-CfZIhn/node_modules/@thecodingmachine/react-native-boilerplate/post-init.script.js at makeError (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/execa/lib/error.js:60:11) at handlePromise (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/execa/index.js:118:26) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async createFromTemplate (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:117:7) at async Object.initialize [as func] (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:184:3) at async Command.handleAction (/Users/agaoglu/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js:109:9) info Run CLI with --verbose flag for more details. `

Yeah i got this also

mtalhagaoglu commented 1 year ago

Install to template with typescript then run the commands by yourself instead of letting it do itself automatically. You can find the CLI commands in this file:

https://github.com/thecodingmachine/react-native-boilerplate/blob/main/template/plugins/compile-js/plugin.js

gregoriusdevon commented 1 year ago

Thanks! @mtalhagaoglu