Skip to content
Justin Tadlock edited this page Dec 23, 2018 · 4 revisions

Every now and again, you're going to run into issues with things. The following is a list of issues that we've run across.

Browsersync reloading instead of injecting CSS

If you run into this issue, you may need to alter the Browsersync code in webpack.mix.js. Locate this section in the file:

mix.browserSync( {
	proxy : 'localhost',
	files : [
		'dist/**/*',
		`${devPath}/views/**/*.php`,
		'app/**/*.php',
		'functions.php'
	]
} );

Change to the following:

mix.browserSync( {
	proxy : 'localhost',
	files : [
		'dist/**/*.css',
		'dist/**/*.js',
		`${devPath}/views/**/*.php`,
		'app/**/*.php',
		'functions.php'
	]
} );

You can further specify file types if needed.

Composer or Node issues

Every now and again, Composer or Node likes to throw us a curveball and not behave for some reason. This can be from anything like simply not working right or leaving files behind. Sometimes, the fix is to simply remove the files and restart.

Composer files are stored in the /vendor directory and Node files are stored in the /node_modules directory. Simply deleting those and reinstalling should work.

Composer

Linux:

rm -rf vendor/

composer install

Windows command:

rmdir /S vendor

composer install

Node

Linux:

rm -rf node_modules/

npm install

Windows command:

rmdir /S node_modules

npm install

Browsersync issues on Linux

If you're running into issues with Browsersync on Linux, try increasing your inotify watches with the following command:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Reference:

Clone this wiki locally