angular / angular/angularfire

Deploying to multiple firebase sites using angularFire and ng deploy

Offen
#3,309 12 Kommentare 1 Reaktion 1 zugewiesene Person Beansprucht von @davideast Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
7.8k
Forks
2.2k
Ø Merge
22 Std. 28 Min.
Gemergte PRs (30 T.)
6

Beschreibung

Versions:
"@angular/cli": "^14.2.10",
"@angular/cdk": "^14.2.1",
"@angular/fire": "^7.4.1",
"firebase": "^9.6.8",

I am having issues with setting up config to allow deploying to a dev/prod sites on Firebase hosting. The sites on firebase are in the same firebase project

I have followed this guide
https://github.com/angular/angularfire/blob/master/docs/deploy/getting-started.md

but I am receiving the same issue as these old unanswered github issues
https://github.com/angular/angularfire/issues/3077

https://github.com/angular/angularfire/issues/3076

Here is my setup

1) angular.json
```
"deploy": {
"builder": "@angular/fire:deploy",
"options": {
"firebaseProject": "<>",
"siteTarget": "devTarget",
"buildTarget": "<>:build:development"
},
"configurations": {
"dev": {
"firebaseProject": "<>",
"siteTarget": "devTarget",
"buildTarget": "<>:build:development"
},
"prod": {
"firebaseProject": "<>",
"siteTarget": "prodTarget",
"buildTarget": "<>:build:development"
}
}
}
}
```

2. firebase.json

```
{
"hosting": [
{
"target": "devTarget",
"public": "dist",
"ignore": [
"**/.*"
]
},
{
"target": "prodTarget",
"public": "dist",
"ignore": [
"**/.*"
]
}
]
}
```

3. .firebaserc
```
{
"projects": {
"default": "<>"
},
"targets": {
"<>": {
"hosting": {
"devTarget": [
"<>"
],
"prodTarget": [
"<>"
]
}
},
"etags": {}
}

```

Should this work if i run ``` ng deploy <> --configuration='dev'```?

I receive the following error from ```node_modules\@angular\fire\schematics\deploy\builder.js:36:15```

```
An unhandled exception occurred: The Firebase Hosting Site specified by your angular.json or .firebaserc is in conflict
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.