infinitered / ignite

Infinite Red's battle-tested React Native project boilerplate, along with a CLI, component/model generators, and more! 9 years of continuous development and counting.
MIT License
17.7k stars 1.4k forks source link

Failed to initialise a new project #1525

Closed rammmukul closed 4 years ago

rammmukul commented 4 years ago

Can not create a new project with bowser.


run: $ ignite new apppp --debug -select bowser -say no to Detox tests

CLI output -

-----------------------------------------------
  (                  )   (
  )\ )   (        ( /(   )\ )    *   )
 (()/(   )\ )     )\()) (()/(  ` )  /(   (
  /(_)) (()/(    ((_)\   /(_))  ( )(_))  )\
 (_))    /(_))_   _((_) (_))   (_(_())  ((_)
 |_ _|  (_)) __| | \| | |_ _|  |_   _|  | __|
  | |     | (_ | | .` |  | |     | |    | _|
 |___|     \___| |_|\_| |___|    |_|    |___|
-----------------------------------------------

An unfair headstart for your React Native apps.
https://infinite.red/ignite

-----------------------------------------------

🔥 igniting app apppp
✔ Which boilerplate would you like to use? · ignite-bowser
16:42:17 [ignite] making directory /Users/rammmukul/apppp
16:42:17 [ignite] switched directory to /Users/rammmukul/apppp
16:42:17 [ignite] running boilerplate-install command
16:42:17 [ignite] installing plugin ignite-bowser from npm
â ¸ adding ignite-bowser16:42:19 [ignite] ignite-bowser 4.12.0 on npm.
16:42:19 [ignite] npm i ignite-bowser --save-dev
â ¼ adding ignite-bowser16:42:25 [ignite] finished npm command
â ‹ installing boilerplate16:42:25 [ignite] reading boilerplate package.json
16:42:25 [ignite] loading boilerplate install script from /Users/rammmukul/apppp/node_modules/ignite-bowser/boilerplate.js
16:42:25 [ignite] running install function from boilerplate
✔ using the Infinite Red boilerplate v3 (code name 'Bowser')
✔ Would you like to include Detox end-to-end tests? (y/N) · false
16:44:06 [ignite] initializing react native
16:44:06 [ignite] npx react-native init apppp --version 0.61.2 --npm
16:44:06 [ignite] initializing react native project
16:44:06 [ignite] command: npx react-native init apppp --version 0.61.2 --npm
This will walk you through creating a new React Native project in /Users/rammmukul/apppp/apppp
Installing react-native@0.61.2...
npm WARN deprecated 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.
npm WARN deprecated 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.

> fsevents@1.2.11 install /Users/rammmukul/apppp/apppp/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> core-js@2.6.11 postinstall /Users/rammmukul/apppp/apppp/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN react-native@0.61.2 requires a peer of react@16.9.0 but none is installed. You must install peer dependencies yourself.

+ react-native@0.61.2
added 717 packages from 431 contributors and audited 66241 packages in 127.07s

5 packages are looking for funding
  run `npm fund` for details

found 4 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
info Setting up new React Native app in /Users/rammmukul/apppp/apppp
info Adding required dependencies
+ react@16.9.0
added 1 package and audited 66450 packages in 6.829s

5 packages are looking for funding
  run `npm fund` for details

found 4 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
info Adding required dev dependencies
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN eslint-plugin-react-native@3.6.0 requires a peer of eslint@^3.17.0 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react@7.12.4 requires a peer of eslint@^3.0.0 || ^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.

+ @babel/runtime@7.8.3
+ jest@24.9.0
+ @react-native-community/eslint-config@0.0.3
+ react-test-renderer@16.9.0
+ @babel/core@7.8.3
+ babel-jest@24.9.0
+ metro-react-native-babel-preset@0.51.1
+ eslint@6.8.0
added 286 packages from 272 contributors, updated 3 packages and audited 952708 packages in 29.935s

19 packages are looking for funding
  run `npm fund` for details

found 4 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
info Installing required CocoaPods dependencies

[!] Invalid `Podfile` file: No such file or directory - npx.

 #  from /Users/rammmukul/apppp/apppp/ios/Podfile:42
 #  -------------------------------------------
 #
 >    use_native_modules!
 #  end
 #  -------------------------------------------

(node:51395) UnhandledPromiseRejectionWarning: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./apppp/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
    at installPods (/Users/rammmukul/apppp/apppp/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/installPods.js:207:13)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:51395) 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:51395) [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.
16:46:59 [ignite] done initializing react native project
✔ added React Native 0.61.2 in 172.89s
16:46:59 [ignite] changed to directory /Users/rammmukul/apppp/apppp
16:46:59 [ignite] merging Bowser package.json with React Native package.json
16:46:59 [ignite] writing newly merged package.json
16:46:59 [ignite] adding boilerplate to project for generator commands
16:47:15 [ignite] adding react-native-gesture-handler
â ‹ â–¸ installing react-native-gesture-handler@^1.5.0 16:47:15 [ignite] npm i react-native-gesture-handler@^1.5.0 --save
16:47:28 [ignite] patching MainActivity.java to add RNGestureHandler
16:47:28 [ignite] patching package.json to add solidarity postInstall
an error occured while installing ignite-bowser boilerplate.
Error: Command failed: npm install
npm WARN deprecated @types/jest-diff@24.3.0: This is a stub types definition. jest-diff provides its own type definitions, so you do not need this installed.
npm WARN deprecated set-value@1.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated set-value@0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated 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.
No patch files found
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! apppp@0.0.1 postinstall: `node ./bin/postInstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the apppp@0.0.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/rammmukul/.npm/_logs/2020-01-14T16_49_03_894Z-debug.log

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:223:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'npm install',
  stderr: 'npm WARN deprecated @types/jest-diff@24.3.0: This is a stub types definition. jest-diff provides its own type definitions, so you do not need this installed.\n' +
    'npm WARN deprecated set-value@1.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version.\n' +
    'npm WARN deprecated set-value@0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.\n' +
    'npm WARN deprecated 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.\n' +
    'No patch files found\n' +
    'npm ERR! code ELIFECYCLE\n' +
    'npm ERR! errno 1\n' +
    'npm ERR! apppp@0.0.1 postinstall: `node ./bin/postInstall`\n' +
    'npm ERR! Exit status 1\n' +
    'npm ERR! \n' +
    'npm ERR! Failed at the apppp@0.0.1 postinstall script.\n' +
    'npm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n' +
    '\n' +
    'npm ERR! A complete log of this run can be found in:\n' +
    'npm ERR!     /Users/rammmukul/.npm/_logs/2020-01-14T16_49_03_894Z-debug.log\n'
}
error installing boilerplate

ignite doctor results:


System
  platform           darwin
  arch               x64
  cpu                4 cores      Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
  directory          rammmukul    /Users/rammmukul

JavaScript
  node               12.14.1      /Users/rammmukul/.nvm/versions/node/v12.14.1/bin/node
  npm                6.13.4       /Users/rammmukul/.nvm/versions/node/v12.14.1/bin/npm
  yarn               -            not installed

Ignite
  ignite-cli         3.5.0        /Users/rammmukul/.nvm/versions/node/v12.14.1/bin/ignite
  ignite src         build        /Users/rammmukul/.nvm/versions/node/v12.14.1/lib/node_modules/ignite-cli/build
  generators         {}

Android
  java               11           /usr/bin/java
  android home       -            /Users/rammmukul/Library/Android/sdk/

iOS
  xcode              11.3
  cocoapods          1.5.2        /usr/local/bin/pod
kevinvangelder commented 4 years ago

Looks like there was an error installing cocoapods. Try verifying that you are running the appropriate versions of Ruby and Cocoapods (check against the React Native documentation suggested versions).

rammmukul commented 4 years ago

At least this page (https://facebook.github.io/react-native/docs/getting-started) does not state any specific version of cocoapods is installed, the doctor result shows 1.5.2 for cocoapods which is slightly old, I used Homebrew to install cocoapods.

I will try installing the latest version and try again, for now I went with Andros instead.

rammmukul commented 4 years ago

OK, it worked with the latest version of cocoapods on my own I never would have the idea to check version of a package manager. thanks @kevinvangelder .