Javascript 使用bitbucket管道在firebase主机中部署Angular应用程序时出现问题

Javascript 使用bitbucket管道在firebase主机中部署Angular应用程序时出现问题,javascript,angular,bitbucket,bitbucket-pipelines,Javascript,Angular,Bitbucket,Bitbucket Pipelines,我通过使用bitbucket管道在firebase主机中部署angular应用程序版本8,但在运行管道时遇到一些错误。 我在某些文件中做了一些更改,请检查以下内容: e2e:dragotor.conf.js exports.config = { ..., capabilities: { 'browserName': 'chrome', chromeOptions: { args: ['--headless', '--no-sandbox'] } } .

我通过使用bitbucket管道在firebase主机中部署angular应用程序版本8,但在运行管道时遇到一些错误。 我在某些文件中做了一些更改,请检查以下内容: e2e:dragotor.conf.js

exports.config = {
...,
  capabilities: {
    'browserName': 'chrome',
    chromeOptions: {
      args: ['--headless', '--no-sandbox']
    }
  }
...}
module.exports = function (config) {
  config.set({
...,
    customLaunchers: {
      ChromeHeadlessCI: {
        base: 'ChromeHeadless',
        flags: ['--no-sandbox']
      }
    }
})
}
package.json

  "scripts": {
...,
    "build:prod": "ng build --prod",
    "deploy": "firebase deploy --token $FIREBASE_TOKEN --non-interactive"
}
karma.conf.js

exports.config = {
...,
  capabilities: {
    'browserName': 'chrome',
    chromeOptions: {
      args: ['--headless', '--no-sandbox']
    }
  }
...}
module.exports = function (config) {
  config.set({
...,
    customLaunchers: {
      ChromeHeadlessCI: {
        base: 'ChromeHeadless',
        flags: ['--no-sandbox']
      }
    }
})
}
双桶管道。yml

image: node:10.16.3
pipelines:
   branches:
      master: #master branch
      - step:
         deployment: production
         caches:
         - node
         script:
         - npm install
         - npm install -g @angular/cli
         - npm install -g firebase-tools 
         - ng build --prod
         - ls -laR ./dist #recursively list directories
         - firebase deploy --token=$FIREBASE_TOKEN --project your-prod-firebase-projectname --non-interactive
      develop: # develop branch 
      - step: 
         deployment: test
         caches:
         - node
         script:
         - npm install
         - npm install -g @angular/cli
         - npm install -g firebase-tools 
         - ng build
         - ls -laR ./dist #recursively list directories
         - firebase deploy --token=$FIREBASE_TOKEN --project your-test-firebase-projectname --non-interactive
我在bitbucket pipelines变量中添加了firebase令牌,但错误显示:

    1. If 'app-header' is an Angular component, then verify that it is part of this module.
    2. If 'app-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("[ERROR ->]<app-header></app-header>
    <div class="container-fluid">
      <section>
...
1。如果“应用程序标题”是一个角度组件,则验证它是否是此模块的一部分。
2.如果“app header”是一个Web组件,则将“CUSTOM_ELEMENTS_SCHEMA”添加到此组件的“@NgModule.schemas”以抑制此消息。(“[错误->]
...
您是否尝试在本地计算机上运行“ng serve--prod”?您可能会获得有关此错误的更多信息,因为它看起来不像Bitbucket错误,更像是角度错误。您还可以将Firebase凭据放入Bitbucket中,我为此撰写了一篇文章: