gulp-notify: [Error in notifier] Error in plugin &

2019-03-15 07:27发布

问题:

I'm trying to setup Gulp in my install of Laravel 5.1. I've ran then command npm install as specified in the Laravel documentation and that's worked fine.

However, when I now run the command gulp I get the following message:

ubuntu@NAME:/var/www/html/FOLDER# gulp
[14:04:56] Using gulpfile /var/www/html/FOLDER/gulpfile.js
[14:04:56] Starting 'default'...
[14:04:56] Starting 'sass'...
[14:04:56] Running Sass: resources/assets/sass/app.scss
[14:04:56] Finished 'default' after 532 ms
[14:04:56] gulp-notify: [Laravel Elixir] Sass Compiled!
[14:04:56] Finished 'sass' after 666 ms
[14:04:56] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
not found: notify-send

Has anyone else encountered the error?

gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
not found: notify-send

Thanks

回答1:

I've found a resolution to this issue myself. I ran the following commands on my Ubuntu box:

sudo apt-get update
sudo apt-get install libnotify-bin

After that, I can now run gulp and get the following:

ubuntu@NAME:/var/www/html/FOLDER# gulp
[14:06:59] Using gulpfile /var/www/html/FOLDER/gulpfile.js
[14:06:59] Starting 'default'...
[14:06:59] Starting 'sass'...
[14:06:59] Running Sass: resources/assets/sass/app.scss
[14:07:00] Finished 'default' after 736 ms
[14:07:00] gulp-notify: [Laravel Elixir] Sass Compiled!
[14:07:00] Finished 'sass' after 931 ms

All looks good. Hopefully that will be of use to other SO users.



回答2:

For CentOS/Fedora/RedHat 7 users:

sudo yum install libnotify

(no "-bin")



回答3:

I have found the following commands, useful:

npm install notify-send

The problem is gone.