ionic-team / ionic-team/ionic-cli

Angular Monorepo problem

Aperta
#5,075 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
triage
Lingua principale
TypeScript
Stelle
2k
Fork
682
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Description:**

Problem with angular workspaces

**Steps to Reproduce:**

I was following this guide [Angular-Monorepo concepts](https://github.com/ionic-team/ionic-cli/wiki/Angular-Monorepo#concepts) but when I run ionic capacitor add ios or ionic capacitor add android I got this output:
```
[capacitor] [error] The Capacitor CLI needs to run at the root of an npm package or in a valid NX monorepo.
[capacitor] Make sure you have a package.json or project.json file in the directory where you run the Capacitor CLI.
[capacitor] More info: https://docs.npmjs.com/cli/init
[capacitor] Missing appId for new platform.
[capacitor] Please add it in capacitor.config.json or run npx cap init.
[ERROR] An error occurred while running subprocess capacitor.
```

**Output:**

**My `ionic info`:**

```
Ionic:

Ionic CLI : 7.1.6
Ionic Framework : @ionic/angular 7.6.5
@angular-devkit/build-angular : 16.1.3
@angular-devkit/schematics : 16.0.6
@angular/cli : 16.0.6
@ionic/angular-toolkit : 9.0.0

Capacitor:

Capacitor CLI : 5.4.1
@capacitor/android : 5.4.1
@capacitor/core : 5.4.1
@capacitor/ios : 5.4.1

Utility:

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

System:

NodeJS : v18.17.1
npm : 9.6.7
OS : macOS Unknown
```

**Other Information:**
[sample app](https://github.com/mlncck/ionic-monorepo-test)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by cloning the linked sample app and reproducing `ionic capacitor add ios` and `ionic capacitor add android` from the Angular monorepo workspace. Read the Capacitor CLI workspace-root detection and Ionic CLI integration; done when platform addition works from the documented workspace layout or the command reports the correct required directory and configuration.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, node.js, typescript
Ambito
build-system, cli
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.