eslint not found in TravisCI Deploy

Viewed 315

I am trying to get a site to deploy to Firebase using TravisCI. I keep running into an issue when the functions deploy and try to run lint. eslint doesn't seem to be there, even though I added a command to cd and npm install. I'm sure this is some kind of no-brainer. What am I missing?

Here's my .travis.yml:

language: node_js
node_js:
  - 12
deploy:
  provider: firebase
  project: "*****"
  message: "Deployed from Github by TravisCI"
  token:
    secure: 
       *******
env:
  global:
    secure: 
       *****
branches:
  only:
    - master
before_deploy:
  - npm install -g gatsby-cli
  - rm -rf node_modules/*/.git/
  - npm install
  - gatsby build
  - cd functions && npm install --dev && cd ..

Here's the error in the Travis log:

Installing deploy dependencies
dpl.2
Preparing deploy
dpl.3
Deploying application
=== Deploying to 'covid19-reports'...
i  deploying storage, firestore, functions, hosting
Running command: npm --prefix "$RESOURCE_DIR" run lint
> functions@ lint /home/travis/build/amygroshek/covid19reports/functions
> eslint .
sh: 1: eslint: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! functions@ lint: `eslint .`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the functions@ lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2020-03-23T00_34_17_951Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code1

0 Answers
Related