我收到以下错误:
===部署到“ nompu网站” ...
i部署功能 运行命令:npm --prefix“ $ RESOURCE_DIR”运行lint
functions @ lint / home / superlelo / Desktop / publishToday / functions 护送。
sh:1:eslint:权限被拒绝 npm ERR!代码ELIFECYCLE npm ERR!埃尔诺126 npm ERR!功能@皮棉:
eslint .
npm ERR!退出状态126 npm ERR! npm ERR!在functions @ lint脚本上失败。 npm ERR! npm可能不是问题。上面可能还有其他日志记录输出。npm错误!可以在以下位置找到此运行的完整日志: npm ERR! /home/superlelo/.npm/_logs/2019-09-24T15_05_43_357Z-debug.log
错误:函数预部署错误:命令以非零退出码126终止
当我运行命令时:firebase deploy --only functions
。无论我是否具有管理员权限,都会收到相同的错误。
我的package.json文件如下:
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"build":"npm run build",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "8"
},
"dependencies": {
"firebase-admin": "^8.0.0",
"firebase-functions": "^3.1.0"
},
"devDependencies": {
"eslint": "^5.12.0",
"eslint-plugin-promise": "^4.0.1",
"firebase-functions-test": "^0.1.6"
},
"private": true
}
这是完整的日志文件:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/bin/npm',
1 verbose cli '--prefix',
1 verbose cli '/home/superlelo/Desktop/publishToday/functions',
1 verbose cli 'run',
1 verbose cli 'lint' ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
5 info lifecycle functions@~prelint: functions@
6 info lifecycle functions@~lint: functions@
7 verbose lifecycle functions@~lint: unsafe-perm in lifecycle true
8 verbose lifecycle functions@~lint: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/superlelo/Desktop/publishToday/functions/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/usr/games:/sbin:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/superlelo/bin:/usr/bin/java/bin:/home/superlelo/Android/sdk/emulator:/home/superlelo/Android/sdk/tools:/home/superlelo/Android/sdk/tools/bin:/home/superlelo/Android/sdk/platform-tools
9 verbose lifecycle functions@~lint: CWD: /home/superlelo/Desktop/publishToday/functions
10 silly lifecycle functions@~lint: Args: [ '-c', 'eslint .' ]
11 silly lifecycle functions@~lint: Returned: code: 126 signal: null
12 info lifecycle functions@~lint: Failed to exec lint script
13 verbose stack Error: functions@ lint: `eslint .`
13 verbose stack Exit status 126
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid functions@
15 verbose cwd /home/superlelo/Desktop/publishToday
16 verbose Linux 4.15.0-64-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "--prefix" "/home/superlelo/Desktop/publishToday/functions" "run" "lint"
18 verbose node v10.16.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 126
22 error functions@ lint: `eslint .`
22 error Exit status 126
23 error Failed at the functions@ lint script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 126, true ]
谁能建议我该如何解决?我在Linux Ubuntu仿生海狸上使用npm 6.9.0。
谢谢