{
"name": "functions",
"scripts": {
"build": "./node_modules/.bin/tslint -p tslint.json && ./node_modules/.bin/tsc",
"serve": "npm run build && firebase serve --only functions",
"shell": "npm run build && firebase experimental:functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"main": "lib/index.js",
"dependencies": {
"@types/express": "^4.0.37",
"firebase-admin": "^5.5.1",
"firebase-functions": "^0.7.3",
"typescript": "^2.6.2"
},
"devDependencies": {
"tslint": "^5.8.0",
"typescript": "^2.5.3"
},
"private": true
}
Steps to set up and reproduce
node v6.11.5
npm v3.10.10
npm ERR! Darwin 17.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "serve"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! functions@ serve: `npm run build && firebase serve --only functions`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the functions@ serve script 'npm run build && firebase serve --only functions'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the functions package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build && firebase serve --only functions
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs functions
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls functions
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
Build functions with use of the TSLint
See error, without ./node_modules/.bin/tslint -p tslint.json && it's builds fine
PS: npm bugs functions then you get functions but not firebase-functions?!
What happens if (from your functions directory) you run ./node_modules/.bin/tslint -p tslint.json ? It sounds like you have a linter error, which should have been printed earlier in the debug output.
Yep, it was a linter error... hanging on a import that was never used