ionic-team / ionic-cli

The Ionic command-line interface
MIT License
2k stars 654 forks source link

Could not run an app on the device #4789

Open kamilchlebek opened 2 years ago

kamilchlebek commented 2 years ago

Description:

Since @ionic/cli@6.16.0 I can't run an app on the device. Switching back to 6.15.0 solves the issue.

Suspected commit: https://github.com/ionic-team/ionic-cli/commit/359cdec031f3c3484093e9fee65e06ef866cfd8b

Steps to Reproduce:

https://github.com/kamilchlebek/ionic-multi-issue

  1. npm install
  2. npm run app1 - šŸ’„
  3. Switch back to @ionic/cli@6.15.0
  4. npm run app1 - āœ…

Output:

Console output ``` npm info it worked if it ends with ok npm verb cli [ npm verb cli '/Users/kamil/.nvm/versions/node/v14.18.1/bin/node', npm verb cli '/Users/kamil/.nvm/versions/node/v14.18.1/bin/npm', npm verb cli 'run', npm verb cli 'app1', npm verb cli '--verbose' npm verb cli ] npm info using npm@6.14.15 npm info using node@v14.18.1 npm verb run-script [ 'preapp1', 'app1', 'postapp1' ] npm info lifecycle ionic-multi@0.0.1~preapp1: ionic-multi@0.0.1 npm info lifecycle ionic-multi@0.0.1~app1: ionic-multi@0.0.1 > ionic-multi@0.0.1 app1 /Users/kamil/work/tmp/ionic-multi > ionic capacitor run ios --project=app1 --livereload --external > npm i -E @capacitor/ios@latest npm info it worked if it ends with ok npm verb cli [ npm verb cli '/Users/kamil/.nvm/versions/node/v14.18.1/bin/node', npm verb cli '/Users/kamil/.nvm/versions/node/v14.18.1/bin/npm', npm verb cli 'i', npm verb cli '-E', npm verb cli '@capacitor/ios@latest' npm verb cli ] npm info using npm@6.14.15 npm info using node@v14.18.1 npm verb npm-session 02837900d3640a1e npm http fetch GET 304 https://registry.npmjs.org/@capacitor%2fios 361ms (from cache) npm timing stage:loadCurrentTree Completed in 402ms npm timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms npm timing stage:loadIdealTree:loadShrinkwrap Completed in 3ms npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 3ms npm timing stage:loadIdealTree Completed in 8ms npm timing stage:generateActionsToTake Completed in 5ms npm verb correctMkdir /Users/kamil/.npm/_locks correctMkdir not in flight; initializing npm verb lock using /Users/kamil/.npm/_locks/staging-5b7db5580e82009f.lock for /Users/kamil/work/tmp/ionic-multi/apps/app1/node_modules/.staging npm timing action:extract Completed in 63ms npm info lifecycle @capacitor/ios@3.3.2~preuninstall: @capacitor/ios@3.3.2 npm info lifecycle @capacitor/ios@3.3.2~uninstall: @capacitor/ios@3.3.2 npm verb unbuild rmStuff @capacitor/ios@3.3.2 from /Users/kamil/work/tmp/ionic-multi/apps/app1/node_modules npm info lifecycle @capacitor/ios@3.3.2~postuninstall: @capacitor/ios@3.3.2 npm timing action:unbuild Completed in 1ms npm timing action:remove Completed in 18ms npm timing action:finalize Completed in 2ms npm timing action:refresh-package-json Completed in 4ms npm info lifecycle @capacitor/ios@3.3.2~preinstall: @capacitor/ios@3.3.2 npm timing action:preinstall Completed in 1ms npm info linkStuff @capacitor/ios@3.3.2 npm timing action:build Completed in 1ms npm info lifecycle @capacitor/ios@3.3.2~install: @capacitor/ios@3.3.2 npm timing action:install Completed in 0ms npm info lifecycle @capacitor/ios@3.3.2~postinstall: @capacitor/ios@3.3.2 npm timing action:postinstall Completed in 1ms npm verb unlock done using /Users/kamil/.npm/_locks/staging-5b7db5580e82009f.lock for /Users/kamil/work/tmp/ionic-multi/apps/app1/node_modules/.staging npm timing stage:executeActions Completed in 100ms npm timing stage:rollbackFailedOptional Completed in 0ms npm timing stage:runTopLevelLifecycles Completed in 517ms npm verb saving [ { name: '@capacitor/ios', spec: '3.3.2', save: 'dependencies' } ] npm verb shrinkwrap skipping write for package.json because there were no changes. npm info lifecycle undefined~preshrinkwrap: undefined npm info lifecycle app1~shrinkwrap: app1 npm verb shrinkwrap skipping write for package-lock.json because there were no changes. npm info lifecycle app1~postshrinkwrap: app1 npm WARN @capacitor/ios@3.3.2 requires a peer of @capacitor/core@^3.3.0 but none is installed. You must install peer dependencies yourself. npm WARN app1@ No description npm WARN app1@ No repository field. npm WARN app1@ No license field. npm timing audit submit Completed in 268ms npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 268ms npm timing audit body Completed in 0ms + @capacitor/ios@3.3.2 updated 1 package and audited 1 package in 0.689s found 0 vulnerabilities npm verb exit [ 0, true ] npm timing npm Completed in 948ms npm info ok > capacitor add ios [capacitor] [error] ios platform already exists. [capacitor] To re-add this platform, first remove ./ios, then run this command again. [capacitor] WARNING: Your native project will be completely removed. [ERROR] An error occurred while running subprocess capacitor. capacitor add ios exited with exit code 1. ```

My ionic info:

Ionic:

   Ionic CLI                     : 6.18.1
   Ionic Framework               : @ionic/angular 5.9.1 
   @angular-devkit/build-angular : 12.1.4 
   @angular-devkit/schematics    : 12.1.4
   @angular/cli                  : 12.1.4
   @ionic/angular-toolkit        : 4.0.0

Capacitor:

   Capacitor CLI      : 3.3.2
   @capacitor/android : not installed
   @capacitor/core    : 3.3.2 
   @capacitor/ios     : 3.3.2

Utility:

   cordova-res : not installed globally
   native-run  : 1.5.0

System:

   NodeJS : v14.18.1
   npm    : 6.14.15
   OS     : macOS Monterey
kamilchlebek commented 2 years ago

Bump. Any news regarding this issue?

kamilchlebek commented 2 years ago

Bump. Still not working in ionic/cli@6.19.0