Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular firebase:在GitLab Runner中找不到命令_Angular_Firebase_Gitlab Ci_Gitlab Ci Runner_Firebase Hosting - Fatal编程技术网

Angular firebase:在GitLab Runner中找不到命令

Angular firebase:在GitLab Runner中找不到命令,angular,firebase,gitlab-ci,gitlab-ci-runner,firebase-hosting,Angular,Firebase,Gitlab Ci,Gitlab Ci Runner,Firebase Hosting,Gitlab runner显示错误,如 /bin/bash: line 116: firebase: command not found my.gitlab-ci.yml文件 image: node:latest cache: paths: - node_modules/ stages: - setup - build - deploy setup: stage: setup script: - npm install --legacy-peer-dep

Gitlab runner显示错误,如

/bin/bash: line 116: firebase: command not found
my.gitlab-ci.yml文件

image: node:latest
cache:
  paths:
    - node_modules/
stages:
  - setup
  - build
  - deploy
setup:
  stage: setup
  script:
    - npm install --legacy-peer-deps
    - npm install @angular/cli
    - npm i -g firebase-tools
build:
  stage: build
  script:
    - npm run build --prod
deploy:
  stage: deploy
  script:
    - firebase deploy --token $FIREBASE_TOKEN

如何解决这个问题?。我的代码有什么问题吗?

这个特殊的错误意味着你没有全局的
firebase
! 试试这个,希望对你有帮助

image: node:latest
build:
  stage: build
  environment: 
    name: production
  script:
    - npm install --legacy-peer-deps
    - npm install @angular/cli
    - npm i -g firebase-tools
    - ./node_modules/.bin/ng build --prod
    - firebase deploy --token $FIREBASE_TOKEN
谢谢! 您还必须通过运行此命令
FIREBASE login:ci
现在你可以走了