[英]missing script: build - firebase deploy
Remove the "predploy" from firebase.json从 firebase.json 中删除“预部署”
{
"functions": {
"predeploy": "npm --prefix functions run build",
"source": "functions"
}
}
For me, it worked when I added this:对我来说,当我添加这个时它起作用了:
"build": "",
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"build": "",
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "12"
},
"main": "index.js",
"dependencies": {
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"firebase": "^7.22.0",
"firebase-admin": "^9.4.1",
"firebase-functions": "^3.11.0"
},
"devDependencies": {
"eslint": "^5.12.0",
"eslint-plugin-promise": "^4.0.1",
"firebase-functions-test": "^0.2.0"
},
"private": true
}
I was also facing the same error.我也面临同样的错误。 I modified the scripts section as follows.
我修改了脚本部分如下。 This resolved the issue and function got deployed.
这解决了问题并部署了功能。
"scripts": {
"build": "",
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
}
just add => build:'' in your package.json只需在 package.json 中添加 => build:''
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.