我正在尝试使用Gulp设置基本工作流程,每当我调用gulp-notify时,我都会收到以下错误。
Design5-Joel:Sura-child design5$ gulp notify
[14:00:17] Using gulpfile ~/Documents/Websites/atoll-wp/wp-content/themes/Sura-child/gulpfile.js
[14:00:17] Starting 'notify'...
[14:00:17] Finished 'notify' after 10 ms
[14:00:17] gulp-notify: [Gulp notification] Hello Gulp!
[14:00:47] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
Message:
Command failed: /Users/design5/Documents/Websites/atoll-wp/wp-content/themes/Sura-child/node_modules/node-notifier/vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier -title "Gulp notification" -message "Hello Gulp!" -appIcon "/Users/design5/Documents/Websites/atoll-wp/wp-content/themes/Sura-child/node_modules/gulp-notify/assets/gulp.png" -json "true"
Details:
killed: true
code: null
signal: SIGTERM
cmd: /Users/design5/Documents/Websites/atoll-wp/wp-content/themes/Sura-child/node_modules/node-notifier/vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier -title "Gulp notification" -message "Hello Gulp!" -appIcon "/Users/design5/Documents/Websites/atoll-wp/wp-content/themes/Sura-child/node_modules/gulp-notify/assets/gulp.png" -json "true"
奇怪的是,函数中的所有内容都会触发,包括通知,然后在30秒后出现错误。如果我想观看文件夹,这尤其是个问题。
如果其他人找到了解决方案,我们将不胜感激
编辑:gulp-notify不是该函数的强制性方面,因此简单的解决方案就是禁用通知,但我希望能够在将来遇到类似问题时解决这个问题。
我试过了;