While trying npm install firebase-tools
and executing firebase deploy
in my deploy workflow I get the following error message:
#!/bin/bash -eo pipefail
firebase deploy --token=$FIREBASE_DEPLOY_TOKEN
/bin/bash: firebase: command not found
Exited with code 127
Installing globally with sudo npm -g firebase-tools
has also lead to an error message, since I apparently don’t have the rights to do so.
Im glad, if anyone can help!
The circle.yml file we’re talking about looks like this:
version: 2
jobs:
build-job:
docker:
- image: circleci/node:9.5.0-stretch
steps:
- checkout
- restore_cache:
keys:
# Find a cache corresponding to this specific package.json checksum
# when this file is changed, this key will fail
- v1-npm-deps-{{ checksum "package.json" }}
# Find the most recent cache used from any branch
- v1-npm-deps-
- run: npm install
- save_cache:
key: v1-npm-deps-{{ checksum "package.json" }}
paths:
- ./node_modules
- run: npm run build
deploy-job:
docker:
- image: circleci/node:9.5.0-stretch
steps:
- run: npm install firebase-tools
- run:
name: Deploy Master to Firebase
command: firebase deploy --token=$FIREBASE_DEPLOY_TOKEN
workflows:
version: 2
-deploy:
jobs:
- build-job:
filters:
branches:
only: stage
- deploy-job:
filters:
branches:
only: master