I am migrating my custom styling from Mendix 7 to Mendix 8, but facing issues with gulp/browsersync. When running ‘gulp dev’, ‘npm run dev’ or ‘npm start’, I get the expected output at first, but after a few seconds, it throws a browsersync error: ---------------------------------------- [16:29:16] 'watch:browsersync-sass' errored after 8.4 s [16:29:16] Error: ENAMETOOLONG: name too long, stat 'D:\source\mendix\swa_frontend-main\theme\styles\sass\theme\styles\sass\theme\styles\sass\theme\styles\sass\theme\styles\sass\theme\styles\sass\theme\styles\sass\theme\styles\sass\theme\styles\sass\theme\styles\sass\theme…. Where the path (theme\styles\sass) is repeated as above until what I guess is the recursion limit. Could it be a problem in the gulpfile?
Yes, it is. Try changing the first several lines of your gulpfile to the following:
Gulpfile.js for theming Mendix themes. Source: https://github.com/mendix/ux-theming.git, version 1.6.0
/* jshint node:true */
// What is the name of the style folder in this theme folder?
var sourceStyleFolder = 'theme/styles/web';
// What is the name of the style folder in the deployment folder?
var deploymentStyleFolder = 'styles/web';
// Browsersync feature, please specify the host & port of the running project (without http://)
var proxyAddress = 'localhost:8080';