@ angular / fire: ошибка развертывания - элемент не определен - PullRequest
0 голосов
/ 12 июля 2020

Я пытаюсь развернуть приложение Angular как другие, но в данном случае у меня ошибка износа. Я установил @ nguniversal / express -engine и @ angular / fire , добавив их с помощью ng add и следя за процессом ... Я уже сделал это с другими, и я нет никаких ошибок.

Итак, скрипт работает нормально, компилируется нормально, но когда пора развертывать в функциях firebase, эта ошибка появляется

Error: Error occurred while parsing your function triggers.

ReferenceError: Element is not defined
    at C:\Users\DELL\Projects\TiendaLasMotos\lasmotos\dist\lasmotos\dist\lasmotos\server\main.js:1:3125323
    at Object.Vz3n (C:\Users\DELL\Projects\TiendaLasMotos\lasmotos\dist\lasmotos\dist\lasmotos\server\main.js:1:3321170)
    at __webpack_require__ (C:\Users\DELL\Projects\TiendaLasMotos\lasmotos\dist\lasmotos\dist\lasmotos\server\main.js:1:317)
    at Object.PjKf (C:\Users\DELL\Projects\TiendaLasMotos\lasmotos\dist\lasmotos\dist\lasmotos\server\main.js:1:2667589)
    at __webpack_require__ (C:\Users\DELL\Projects\TiendaLasMotos\lasmotos\dist\lasmotos\dist\lasmotos\server\main.js:1:317)
    at Object.FFiX (C:\Users\DELL\Projects\TiendaLasMotos\lasmotos\dist\lasmotos\dist\lasmotos\server\main.js:1:1988445)
    at __webpack_require__ (C:\Users\DELL\Projects\TiendaLasMotos\lasmotos\dist\lasmotos\dist\lasmotos\server\main.js:1:317)
    at Object.0Em7 (C:\Users\DELL\Projects\TiendaLasMotos\lasmotos\dist\lasmotos\dist\lasmotos\server\main.js:1:121837)
    at __webpack_require__ (C:\Users\DELL\Projects\TiendaLasMotos\lasmotos\dist\lasmotos\dist\lasmotos\server\main.js:1:317)
    at Object.jkDv (C:\Users\DELL\Projects\TiendaLasMotos\lasmotos\dist\lasmotos\dist\lasmotos\server\main.js:1:4951582

Я обнаружил, что проблема в main.js файл, созданный командой ng deploy, и я не знаю, где я могу контролировать эту ошибку.

Я прикреплю свой пакет. json

{
  "name": "lasmotos",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "dev:ssr": "ng run lasmotos:serve-ssr",
    "serve:ssr": "node dist/lasmotos/server/main.js",
    "build:ssr": "ng build --prod && ng run lasmotos:server:production",
    "prerender": "ng run lasmotos:prerender"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~9.1.9",
    "@angular/cdk": "^9.2.4",
    "@angular/common": "~9.1.9",
    "@angular/compiler": "~9.1.9",
    "@angular/core": "~9.1.9",
    "@angular/fire": "^6.0.2",
    "@angular/forms": "~9.1.9",
    "@angular/material": "^9.2.4",
    "@angular/platform-browser": "~9.1.9",
    "@angular/platform-browser-dynamic": "~9.1.9",
    "@angular/platform-server": "~9.1.9",
    "@angular/router": "~9.1.9",
    "@angular/service-worker": "~9.1.9",
    "@fullcalendar/angular": "^4.4.5-beta",
    "@fullcalendar/common": "^5.0.0-beta.3",
    "@fullcalendar/core": "^4.4.2",
    "@fullcalendar/daygrid": "^4.4.2",
    "@fullcalendar/interaction": "^4.4.2",
    "@fullcalendar/timegrid": "^4.4.2",
    "@nguniversal/express-engine": "^9.1.1",
    "@types/jquery": "^3.3.38",
    "@types/materialize-css": "^1.0.8",
    "angular2-text-mask": "^9.0.0",
    "api-ai-javascript": "^2.0.0-beta.21",
    "express": "^4.15.2",
    "firebase": "^7.13.1",
    "firebase-admin": "^8.12.1",
    "firebase-functions": "^3.7.0",
    "firebase-tools": "^8.4.2",
    "hammerjs": "^2.0.8",
    "http-proxy": "^1.18.1",
    "jquery": "^3.5.1",
    "live-server": "^1.2.1",
    "ng-simple-slideshow": "^1.2.9",
    "ngx-facebook": "^3.0.0-0",
    "ngx-mask": "^9.1.2",
    "ngx-quill": "^11.0.0",
    "quill": "^1.3.7",
    "rxjs": "~6.5.4",
    "tslib": "^1.10.0",
    "wnumb": "^1.2.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/architect": ">= 0.900 < 0.1100",
    "@angular-devkit/build-angular": "~0.901.7",
    "@angular/cli": "~9.1.7",
    "@angular/compiler-cli": "~9.1.9",
    "@nguniversal/builders": "^9.1.1",
    "@types/express": "^4.17.0",
    "@types/jasmine": "~3.5.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.11.1",
    "codelyzer": "^5.1.2",
    "firebase-admin": "^8.10.0",
    "firebase-functions": "^3.6.0",
    "firebase-functions-test": "^0.2.0",
    "firebase-tools": "^8.0.0",
    "fuzzy": "^0.1.3",
    "inquirer": "^6.2.2",
    "inquirer-autocomplete-prompt": "^1.0.1",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~4.2.1",
    "jsdom": "16.3.0",
    "jsdom-global": "3.0.2",
    "karma": "~5.0.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~2.1.0",
    "karma-jasmine": "~3.0.1",
    "karma-jasmine-html-reporter": "^1.4.2",
    "open": "^7.0.3",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "tslint": "~6.1.0",
    "typescript": "~3.8.3"
  }
}

...