Closed F3n67u closed 2 years ago
$ cat package.json { "dependencies": { "node-notifier": "^10.0.1" } } $ cat test.js const notifier = require('node-notifier'); notifier.notify({ title: 'My notification', message: 'Hello, there!' }); # no notification after run test.js, just silently fail $ DEBUG=notifier node test.js node-notifier debug info (fileCommandJson): [notifier path] /Users/feng/test/test-notify/node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier [notifier options] -title "My notification" -message "Hello, there!" -timeout "10" -json "true"
should send a notification
no notification shows
macOS version: 12.2.1 node: v17.6.0
I forgot to turn on notification permission to terminal-notifier, so node-notifier won't work. after turning on the permission, notification shows.
But how did you manage to ask for permission during production?
Reproduce step
Expect Behavior
should send a notification
Actual Behavior
no notification shows
Environment
macOS version: 12.2.1 node: v17.6.0