Firebase-tools: فشل أمر نشر Firebase (يجب أن يوفر الخطأ إما "موقع" أو "هدف" في كل تهيئة "استضافة")

تم إنشاؤها على ١ مارس ٢٠٢٠  ·  3تعليقات  ·  مصدر: firebase/firebase-tools

حاولت تشغيل الأمر "نشر Firebase" لنشر تطبيق على Firebase ولكن كان لدي الخطأ الذي ذكرته بين قوسين في العنوان:

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

هذا ما يبدو عليه ملف .firebaserc الخاص بي حاليًا:
"" .firebaserc
{
"المشاريع": {
"الافتراضي": "phonestore-4e40c"
} ،
"الأهداف": {
"phonestore-4e40c": {
"الاستضافة": {
"متجر الهواتف": [
"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:

! خطأ JSON أثناء محاولة تحميل E: \ programme \ angular \ phone-store.firebaserc

=== جارٍ النشر إلى 'phonestore-4e40c' ...

أنا نشر الاستضافة

خطأ: يجب توفير إما "موقع" أو "هدف" في كل تكوين "استضافة".

(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:

نانوغرام نشر
بناء "متجر هواتف"
إنشاء حزم ES5 للتحميل التفاضلي ...
اكتمل إنشاء حزمة ES5.

chunk {2} polyfills-es2015.d39e6b85441999f66523.js (polyfills) 35.6 كيلوبايت [أولية] [مقدمة]
chunk {3} polyfills-es5.bb7828de73427b5cd027.js (polyfills-es5) 128 كيلو بايت [أولي] [تم تقديمه]
chunk {0} runtime-es2015.0811dcefd377500b5b1a.js (وقت التشغيل) 1.45 كيلو بايت [الإدخال] [المقدمة]
chunk {0} runtime-es5.0811dcefd377500b5b1a.js (وقت التشغيل) 1.45 كيلو بايت [الإدخال] [المقدمة]
chunk {1} main-es2015.d600346e98d8457cc378.js (main) 277 kB [أولي] [تم تقديمه]
chunk {1} main-es5.d600346e98d8457cc378.js (main) 337 kB [أولي] [تم تقديمه]
chunk {4} styles.f1fcab432634cda74b08.css (أنماط) 1.68 كيلو بايت [مبدئي] [مقدم]
التاريخ: 2020-03-01 T15: 29: 58.651Z - التجزئة: 3f6a31e9de18891acf13 - الوقت: 40448ms
RangeError: تم تجاوز الحد الأقصى لحجم مكدس الاستدعاءات
at formatError (داخلي / استخدام / inspect.js: 1095: 20)
في formatRaw (داخلي / استخدام / inspect.js: 883: 14)
في formatValue (داخلي / استخدام / inspect.js: 737: 10)
في التفتيش (داخلي / استخدام / inspect.js: 280: 10)
في formatWithOptionsInternal (داخلي / استخدام / inspect.js: 1886: 40)
بالتنسيق (داخلي / استخدام / inspect.js: 1762: 10)
في Object.console.warn (E: \ البرمجة \ الزاوي \ متجر الهاتف \ node_modules \angular \ cli \ lib \ cli \ index.js: 46: 35)
في Observable._trySubscribe (E: \ programme \ angular \ phone-store \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ internal \ Observable.js: 55: 25)
في Observable.subscribe (E: \ programme \ angular \ phone-store \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ internal \ Observable.js: 30: 22)
في MergeMapOperator.call (E: \ البرمجة \ الزاوي \ متجر الهاتف \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ Internal \ Operators \ mergeMap.js: 39: 23)
في Observable.subscribe (E: \ programme \ angular \ phone-store \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ internal \ Observable.js: 25: 31)
في IgnoreElementsOperator.call (E: \ برمجة \ angular \ phone-store \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ Internal \ Operators \ ignoreElements.js: 27: 23)
في Observable.subscribe (E: \ programme \ 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: \ البرمجة \ الزاوي \ متجر الهاتف \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ Internal \ Operators \ mergeMap.js: 82: 29)
في MergeMapSubscriber._tryNext (E: \ برمجة \ أنجولار \ مخزن الهاتف \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ Internal \ Operators \ mergeMap.js: 76: 14)
في MergeMapSubscriber._next (E: \ البرمجة \ الزاوي \ متجر الهاتف \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ Internal \ Operators \ mergeMap.js: 59: 18)
في MergeMapSubscriber.Subscriber.next (E: \ البرمجة \ الزاوي \ متجر الهاتف \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ internal \ Subscriber.js: 66: 18)
في Observable._subscribe (E: \ programme \ angular \ phone-store \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ internal \ util \ subscribeToArray.js: 5:20)
في Observable._trySubscribe (E: \ programme \ angular \ phone-store \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ internal \ Observable.js: 44: 25)
في Observable.subscribe (E: \ programme \ angular \ phone-store \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ internal \ Observable.js: 30: 22)
في MergeMapOperator.call (E: \ البرمجة \ الزاوي \ متجر الهاتف \ node_modules \ @ angular-devkit \ core \ node_modules \ rxjs \ Internal \ Operators \ mergeMap.js: 39: 23)
سيكون عمل أمر " Would be good if I could get this to work. If not, then the firebase publish" أمرًا جيدًا أيضًا.

التعليق الأكثر فائدة

حسنًا ، لا بد أن شيئًا غريبًا قد حدث لأنني قمت بتشغيل ng deploy مرة أخرى وهذه المرة نجحت.

ال 3 كومينتر

حسنًا ، لا بد أن شيئًا غريبًا قد حدث لأنني قمت بتشغيل ng deploy مرة أخرى وهذه المرة نجحت.

شكرًا DragonOsman ، الأمر firebase deploy لا يعمل ، لا بد لي من استخدام الأمر ng deploy .

الحصول على نفس الخطأ ولكن تم العثور على حل بديل.
يعمل "نشر Firebase" بالنسبة لي بعد إضافة سطر إضافي "target": "app" في ملف تكوين firebase.json ، على النحو التالي:

{
"الاستضافة": [
{
"الهدف": "التطبيق" ،
"عام": "www"،
...

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات