Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError in plugin "gulp-notify" #148

Open
tomhayes opened this issue Jun 22, 2019 · 6 comments
Open

SyntaxError in plugin "gulp-notify" #148

tomhayes opened this issue Jun 22, 2019 · 6 comments

Comments

@tomhayes
Copy link

Bug Report

I've updated the config file and when I runnpm start everything seems to run ok the first time (and compiles SASS)... but then when it reaches the end (after STYLES - completed! I get the error and the task doesn't seem to continue watching/compiling files:

Message:
    Unexpected token { in JSON at position 129
[12:42:20] gulp-notify: [Error in notifier] SyntaxError in plugin "gulp-notify"
Message:
    Unexpected token { in JSON at position 129

I'm on OSX Mojave 10.14.5 and using a Docker container.

I've installed notify-send in the project with npm install notify-send but this has made no difference. I've also installed libnotify globally on my system with brew install libnotify but this has also not fixed the issue.

I've also tried adding double quotes around the properties as mentioned in mikaelbr/gulp-notify#129

  1. node -v: v10.16.0
  2. npm -v: 6.9.0.
@ahmadawais
Copy link
Owner

Your configuration might have a syntax error. Did you check that?

@tomhayes
Copy link
Author

Hmmm I think it's all ok...

/**
 * WPGulp Configuration File
 *
 * 1. Edit the variables as per your project requirements.
 * 2. In paths you can add <<glob or array of globs>>.
 *
 * @package WPGulp
 */

module.exports = {

	// Project options.
	projectURL: '127.0.0.1:8080', // Local project URL of your already running WordPress site. Could be something like wpgulp.local or localhost:3000 depending upon your local WordPress setup.
	productURL: './', // Theme/Plugin URL. Leave it like it is, since our gulpfile.js lives in the root folder.
	browserAutoOpen: false,
	injectChanges: true,

	// Style options.
	styleSRC: './assets/sass/style.scss', // Path to main .scss file.
	styleDestination: './assets/css', // Path to place the compiled CSS file. Default set to root folder.
	outputStyle: 'compact', // Available options → 'compact' or 'compressed' or 'nested' or 'expanded'
	errLogToConsole: true,
	precision: 10,

	// JS Vendor options.
	jsVendorSRC: './assets/js/vendor/*.js', // Path to JS vendor folder.
	jsVendorDestination: './assets/js/', // Path to place the compiled JS vendors file.
	jsVendorFile: 'vendor', // Compiled JS vendors file name. Default set to vendors i.e. vendors.js.

	// JS Custom options.
	jsCustomSRC: './assets/js/custom/*.js', // Path to JS custom scripts folder.
	jsCustomDestination: './assets/js/', // Path to place the compiled JS custom scripts file.
	jsCustomFile: 'custom', // Compiled JS custom file name. Default set to custom i.e. custom.js.

	// Images options.
	imgSRC: './assets/img/raw/**/*', // Source folder of images which should be optimized and watched. You can also specify types e.g. raw/**.{png,jpg,gif} in the glob.
	imgDST: './assets/img/', // Destination folder of optimized images. Must be different from the imagesSRC folder.

	// Watch files paths.
	watchStyles: './assets/scss/**/*.scss', // Path to all *.scss files inside css folder and inside them.
	watchJsVendor: './assets/js/vendor/*.js', // Path to all vendor JS files.
	watchJsCustom: './assets/js/custom/*.js', // Path to all custom JS files.
	watchPhp: './**/*.php', // Path to all PHP files.

	// Translation options.
	textDomain: 'mysocialnetwork', // Your textdomain here.
	translationFile: 'mysocialnetwork.pot', // Name of the translation file.
	translationDestination: './languages', // Where to save the translation files.
	packageName: 'mysocialnetwork', // Package name.
	bugReport: 'https://TomHay.es', // Where can users report bugs.
	lastTranslator: 'Tom Hayes <[email protected]>', // Last translator Email ID.
	team: 'Tom Hayes <[email protected]>', // Team's Email ID.

	// Browsers you care about for autoprefixing. Browserlist https://github.com/ai/browserslist
	// The following list is set as per WordPress requirements. Though, Feel free to change.
	BROWSERS_LIST: [
		'last 2 version',
		'> 1%',
		'ie >= 11',
		'last 1 Android versions',
		'last 1 ChromeAndroid versions',
		'last 2 Chrome versions',
		'last 2 Firefox versions',
		'last 2 Safari versions',
		'last 2 iOS versions',
		'last 2 Edge versions',
		'last 2 Opera versions'
	]
};

@JeremyEnglert
Copy link
Collaborator

The error you're getting and the fact you made config changes makes me think this is a config issue, but your config looks fine and the config file isn't JSON (which the error points to).

If you go back to the default config file, do you still have the issue?

@tomhayes
Copy link
Author

Changed back to the default config file and still getting the same issue!

@tomhayes
Copy link
Author

As it seems to be a issue with the notification system, is there a way I can just disable this? messages in the command line are enough for me!

@ahmadawais
Copy link
Owner

ahmadawais commented Jun 24, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants