我试图通过我刚刚下载的node.js将我的项目部署到firebase但是我收到了错误。
它说npm ERR!缺少脚本:构建
我已经检查了我的package.json文件,里面没有构建引用。我试过把一个放入,但也没有用。我陷入了僵局。 :( 有谁知道如何解决这个问题?
Package.json文件
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"build:production": "node --8.9.1",
"serve": "firebase serve --only functions",
"shell": "firebase experimental:functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"dependencies": {
"firebase-admin": "~5.4.2",
"firebase-functions": "^0.7.1"
},
"private": true
}
Firebase.json
{
"functions": {
"predeploy": "npm --prefix functions run build",
"source": "functions"
}
}