Angular firebase:在GitLab Runner中找不到命令
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
/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
现在你可以走了