Firebase deploy: functions predeploy error: Command terminated with non-zero exit code126

npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! functions@ lint: `eslint .`
npm ERR! Exit status 126
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.

Received error number 126 relating to eslint lint when deploying project to firebase. Down to broken/missing Lint package.

Solution

  • cd into project functions directory
  • run this:
rm -rf node_modules/ && npm install and npm cache clean --force

Deploy again and the error should be gone:

Source: https://stackoverflow.com/questions/48602833/eslint-error-while-trying-to-deploy-firebase-functions

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.