В настоящее время я работаю над push-уведомлениями, используя firebase-cloud-messaging. Токен click_action по-прежнему поддерживается, но все равно я получаю эту ошибку. Мой код:
Ошибка в cmd (Firebase CLI):
notification: {
title: "Notification from" + from_name,
body: from_message,
sound: "default"
click_action: "com.example.tysf_trial"
}
Эта ошибка возникает при развертывании,
43:5 error Parsing error: Unexpected token click_action
? 1 problem (1 error, 0 warnings)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! functions@ lint: `eslint .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the functions@ lint script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\abc\AppData\Roaming\npm-cache\_logs\2019-11-05T19_43_05_08
1Z-debug.log
events.js:187
throw er; // Unhandled 'error' event
^
Error: spawn npm --prefix "%RESOURCE_DIR%" run lint ENOENT
at notFoundError (C:\Users\abc\AppData\Roaming\npm\node_modules\←[4mfirebase
-tools←[24m\node_modules\←[4mcross-env←[24m\node_modules\←[4mcross-spawn←[24m\li
b\enoent.js:6:26)
at verifyENOENT (C:\Users\abc\AppData\Roaming\npm\node_modules\←[4mfirebase-
tools←[24m\node_modules\←[4mcross-env←[24m\node_modules\←[4mcross-spawn←[24m\lib
\enoent.js:40:16)
at ChildProcess.cp.emit (C:\Users\abc\AppData\Roaming\npm\node_modules\←[4mf
irebase-tools←[24m\node_modules\←[4mcross-env←[24m\node_modules\←[4mcross-spawn←
[24m\lib\enoent.js:27:25)
←[90m at Process.ChildProcess._handle.onexit (internal/child_process.js:272:1
2)←[39m
Emitted 'error' event on ChildProcess instance at:
at ChildProcess.cp.emit (C:\Users\abc\AppData\Roaming\npm\node_modules\←[4mf
irebase-tools←[24m\node_modules\←[4mcross-env←[24m\node_modules\←[4mcross-spawn←
[24m\lib\enoent.js:30:37)
←[90m at Process.ChildProcess._handle.onexit (internal/child_process.js:272:1
2)←[39m {
code: ←[32m'ENOENT'←[39m,
errno: ←[32m'ENOENT'←[39m,
syscall: ←[32m'spawn npm --prefix "%RESOURCE_DIR%" run lint'←[39m,
path: ←[32m'npm --prefix "%RESOURCE_DIR%" run lint'←[39m,
spawnargs: []
}