Firebase-tools: Échec de la commande de déploiement de Firebase (l'erreur doit indiquer « site » ou « cible » dans chaque configuration « d'hébergement ».)

Créé le 1 mars 2020  ·  3Commentaires  ·  Source: firebase/firebase-tools

J'ai essayé d'exécuter la commande "firebase deploy" pour déployer une application sur Firebase mais j'ai eu l'erreur que j'ai mentionnée entre parenthèses dans le titre :

 Error: Must supply either "site" or "target" in each "hosting" config.

Voici à quoi ressemble mon fichier .firebaserc actuellement :
```.firebaserc
{
"projets": {
"default": "phonestore-4e40c"
},
"cibles": {
"phonestore-4e40c": {
"hébergement": {
"téléphone magasin": [
"phonestore-4e40c"
]
}
}
}
}

What do I do here to fix the error?  I tried adding `"target":` before `"phonestore-4e40c"` (it would become `"target": "phonestore-4e40c"`) but that didn't work either; it gave me this error:

! Erreur JSON en essayant de charger E:\programming\angular\phone-store.firebaserc

=== Déploiement sur 'phonestore-4e40c'...

je déploie l'hébergement

Erreur : doit fournir soit « site » soit « cible » dans chaque configuration « d'hébergement ».

(This is almost the same as the one I got when I ran just `firebase deploy`; the only thing new is the line about a JSON error).  

Any help with this is much appreciated.  (Note: The reason I didn't open a "Bug Report" issue is that I wasn't sure if my issue qualifies as a bug report.)

Before that I had tried the `ng deploy` command since I was following the Angular Getting Started Tutorial and had gotten to the deployment part after following the whole thing ([here](https://angular.io/start/start-deployment)).  I'd chosen to deploy it to Firebase after downloading it to my computer.  The result of that was this:

ng déployer
Bâtiment "téléphone-store"
Génération de bundles ES5 pour le chargement différentiel...
Génération du bundle ES5 terminée.

morceau {2} polyfills-es2015.d39e6b85441999f66523.js (polyfills) 35,6 ko [initial] [rendu]
morceau {3} polyfills-es5.bb7828de73427b5cd027.js (polyfills-es5) 128 Ko [initial] [rendu]
morceau {0} runtime-es2015.0811dcefd377500b5b1a.js (exécution) 1,45 ko [entrée] [rendu]
morceau {0} runtime-es5.0811dcefd377500b5b1a.js (exécution) 1,45 ko [entrée] [rendu]
morceau {1} main-es2015.d600346e98d8457cc378.js (main) 277 Ko [initial] [rendu]
morceau {1} main-es5.d600346e98d8457cc378.js (main) 337 Ko [initial] [rendu]
morceau {4} styles.f1fcab432634cda74b08.css (styles) 1,68 ko [initial] [rendu]
Date : 2020-03-01T15:29:58.651Z - Hash : 3f6a31e9de18891acf13 - Temps : 40448ms
RangeError : taille maximale de la pile d'appels dépassée
à formatError (interne/util/inspect.js:1095:20)
au formatRaw (interne/util/inspect.js:883:14)
à formatValue (interne/util/inspect.js:737:10)
à inspecter (interne/util/inspect.js:280:10)
au formatWithOptionsInternal (internal/util/inspect.js:1886:40)
au format (interne/util/inspect.js:1762:10)
à Object.console.warn (E:\programming\angular\phone-store\node_modules\@angular\cli\lib\cli\index.js:46:35)
à Observable._trySubscribe (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Observable.js:55:25)
à Observable.subscribe (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Observable.js:30:22)
à MergeMapOperator.call (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:39:23)
à Observable.subscribe (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Observable.js:25:31)
à IgnoreElementsOperator.call (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\ignoreElements.js:27:23)
à Observable.subscribe (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Observable.js:25:31)
à Object.subscribeToResult (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\util\subscribeToResult.js:12:23)
à MergeMapSubscriber._innerSub (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:82:29)
à MergeMapSubscriber._tryNext (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:76:14)
à MergeMapSubscriber._next (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
sur MergeMapSubscriber.Subscriber.next (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:66:18)
à Observable._subscribe (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\util\subscribeToArray.js:5:20)
à Observable._trySubscribe (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Observable.js:44:25)
à Observable.subscribe (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Observable.js:30:22)
à MergeMapOperator.call (E:\programming\angular\phone-store\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:39:23)
La commande `` Would be good if I could get this to work. If not, then the firebase deploy` fonctionnerait bien aussi.

Commentaire le plus utile

D'accord, quelque chose de bizarre a dû se passer parce que je viens de relancer ng deploy et cette fois, cela a fonctionné.

Tous les 3 commentaires

D'accord, quelque chose de bizarre a dû se passer parce que je viens de relancer ng deploy et cette fois, cela a fonctionné.

Merci @DragonOsman , la commande firebase deploy ne fonctionne pas, je dois utiliser la commande ng deploy .

Obtenir la même erreur mais trouver une solution de contournement.
"firebase deploy" fonctionne pour moi après avoir ajouté une ligne supplémentaire "target": "app" dans le fichier de configuration firebase.json, comme suit :

{
"hébergement": [
{
"cible": "application",
"public": "www",
...

Cette page vous a été utile?
0 / 5 - 0 notes