Reputation: 123
trying to deploy project on firebase gives me the error below any ideas, Thanks for help
sherif Folio $ firebase deploy
=== Deploying to 'plan2-plan2'...
i deploying functions, hosting
Running command: npm --prefix "$RESOURCE_DIR" run lint
npm ERR! path /home/sherif/functions/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open
'/home/sherif/functions/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sherif/.npm/_logs/2018-04-28T22_14_49_737Z-
debug.log
Error: functions predeploy error: Command terminated with non-zero
exit code254
Upvotes: 1
Views: 305
Reputation: 534
I also went through such problem and What I ended up doing was editing the firebase.json file and changed the preflight commands to be npm --prefix ./functions run lint
. This seems to work on both Linux and Windows.
Initial code in file:
{
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint"
]
}
}
Upvotes: 2