When running the following command:
运行以下命令时:
npm --prefix "$RESOURCE_DIR" run lint
It returns the following error:
它返回以下错误:
npm ERR! missing script: lint
错误的ERR!缺少脚本:lint
npm ERR! A complete log of this run can be found in:
错误的ERR!可以在以下位置找到此运行的完整日志:
npm ERR! C:\Users\HP\AppData\Roaming\npm-cache\_logs\2018-04-13T01_27_59_009Z-debug.log
错误的ERR! C:\用户\ HP \应用程序数据\漫游\ NPM-缓存\ _logs \ 2018-04-13T01_27_59_009Z-的debug.log
Error: functions predeploy error: Command terminated with non-zero exit code1
错误:函数预部署错误:命令以非零退出代码1终止
This is my package.json
:
这是我的package.json:
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"dependencies": {
"firebase-admin": "~5.12.0",
"firebase-functions": "^1.0.1"
},
"private": true
}
1 个解决方案
#1
0
You are trying to run the lint
task, but it doesn't exist in your package definition. Are you sure you're not wanting to run the following (based on your question title)?
您正在尝试运行lint任务,但它在包定义中不存在。你确定你不想运行以下内容(基于你的问题标题)吗?
npm --prefix "$RESOURCE_DIR" run deploy
Edit: ok, looks like Firebase expects a lint script. So just add "lint": ""
to your scripts.
编辑:好的,看起来Firebase需要一个lint脚本。所以只需在脚本中添加“lint”:“”即可。
#1
0
You are trying to run the lint
task, but it doesn't exist in your package definition. Are you sure you're not wanting to run the following (based on your question title)?
您正在尝试运行lint任务,但它在包定义中不存在。你确定你不想运行以下内容(基于你的问题标题)吗?
npm --prefix "$RESOURCE_DIR" run deploy
Edit: ok, looks like Firebase expects a lint script. So just add "lint": ""
to your scripts.
编辑:好的,看起来Firebase需要一个lint脚本。所以只需在脚本中添加“lint”:“”即可。