Cloud Functions 的 Firebase 部署因 TypeScript 失败

Aza*_*lvi 6 firebase firebase-hosting ionic3

我想将我的 Ionic 应用程序托管到 firebase 托管。现在,当我运行firebase deploy命令时,出现以下错误

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! functions@ build: `tslint -p tslint.json && ./node_modules/.bin/tsc`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the functions@ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Error: functions predeploy command terminated with non-zero exit code1
Run Code Online (Sandbox Code Playgroud)

我缺少什么才能正常工作

小智 2

Package.json 的更改

"build": "node_modules/.bin/tslint -p tslint.json && ./node_modules/.bin/tsc"
Run Code Online (Sandbox Code Playgroud)

"build": "node_modules/.bin/tslint -p tslint.json && tsc"
Run Code Online (Sandbox Code Playgroud)

这对你有用。

  • Package.json 中没有“build”键 (2认同)