infinitered / ignite-bowser

Bowser is now re-integrated into Ignite CLI! Head to https://github.com/infinitered/ignite to check it out.
https://infinite.red/ignite
MIT License
615 stars 140 forks source link

Failed to initialise boilerplate at npm install #314

Closed bartolomej closed 4 years ago

bartolomej commented 4 years ago

Ignite initialisation script fails and exits with following error:

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 popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
No patch files found
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-ignite-ap@0.0.1 postinstall: `node ./bin/postInstall`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the test-ignite-ap@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/bartolomejkozorog/.npm/_logs/2020-02-12T15_46_53_814Z-debug.log

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:210: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 popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1\n' +
    'No patch files found\n' +
    'npm ERR! code ELIFECYCLE\n' +
    'npm ERR! errno 1\n' +
    'npm ERR! test-ignite-ap@0.0.1 postinstall: `node ./bin/postInstall`\n' +
    'npm ERR! Exit status 1\n' +
    'npm ERR! \n' +
    'npm ERR! Failed at the test-ignite-ap@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/bartolomejkozorog/.npm/_logs/2020-02-12T15_46_53_814Z-debug.log\n'
}
error installing boilerplate

When i cd AppName/AppName && npm i it returns the following error:

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 popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated set-value@0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.

> test-ignite-ap@0.0.1 postinstall /Users/bartolomejkozorog/WebstormProjects/TestIgniteAp/TestIgniteAp
> node ./bin/postInstall

✖ Error: Command failed: xcodebuild -version
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Solidarity checks failed.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-ignite-ap@0.0.1 postinstall: `node ./bin/postInstall`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the test-ignite-ap@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/bartolomejkozorog/.npm/_logs/2020-02-12T15_52_04_950Z-debug.log

... but the app builds and works as expected for android after running npm run android.

ignite doctor returns:

System
  platform           darwin                                                                
  arch               x64                                                                   
  cpu                4 cores        Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz               
  directory          TestIgniteAp   /Users/bartolomejkozorog/WebstormProjects/TestIgniteAp 

JavaScript
  node               12.12.0      /usr/local/bin/node 
  npm                6.13.6       /usr/local/bin/npm  
  yarn               -            not installed       

Ignite
  ignite-cli         3.5.1                                                                                                        /usr/local/bin/ignite                        
  ignite src         build                                                                                                        /usr/local/lib/node_modules/ignite-cli/build 
  generators         {"component":"ignite-bowser","model":"ignite-bowser","navigator":"ignite-bowser","screen":"ignite-bowser"}                                                

Android
  java               1.8.0_242    /usr/bin/java                                
  android home       -            /Users/bartolomejkozorog/Library/Android/sdk 
  Error: Command failed: xcodebuild -version
  xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

  - child_process.js:295 ChildProcess.exithandler
    child_process.js:295:12

  - events.js:210 ChildProcess.emit
    events.js:210:5

  - child_process.js:1021 maybeClose
    internal/child_process.js:1021:16

  - child_process.js:430 Socket.<anonymous>
    internal/child_process.js:430:11

  - events.js:210 Socket.emit
    events.js:210:5

  - net.js:658 Pipe.<anonymous>
    net.js:658:12

/usr/local/lib/node_modules/ignite-cli/node_modules/gluegun/build/index.js:13
    throw up;
    ^

Error: Command failed: xcodebuild -version
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:210:5)
    at Pipe.<anonymous> (net.js:658:12) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'xcodebuild -version',
  stderr: "xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance\n"
}
hedgerh commented 4 years ago

If I remember correctly, you need to install Xcode from the App Store, open the Xcode app, and agree to the terms of service.

iamkarlson commented 4 years ago

Can you check that you have files in your bin folder in your root? It must be postInstall and setup, 2 files. It looks like that most of the time bin directory being ignored and they disappear on cleaning up your prj dir with git clean or similar (checkout can also cause it).

bartolomej commented 4 years ago

I apologize for the late response. I have installed XCode and aggreed to terms of service but still nothing changes. Also i have all the required files in directory MyApp/MyApp/bin (postInstall and setup).

bartolomej commented 4 years ago

It worked now when I ran:

 sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
 sudo xcodebuild -runFirstLaunch

Sorry for the inconvenience.