I am attempting to run gulp (local, deploy or without a task) on unaltered versions of SCA 2+, in ubuntu 17.04 using nvm to change my node.js version. Elbrus with node v7.10.0 completes without issue. Anything older (Vinson with v4.8.3, Mont Blanc with v4.4.7 or Denali with v0.12.18) will build for a while then throw the following:
events.js:141
throw er; // Unhandled 'error' event
^
SyntaxError: Invalid flags supplied to RegExp constructor 'u'
at new RegExp (native)
at XMLStringifier.module.exports.XMLStringifier.assertLegalChar (/home/user/Downloads/SuiteCommerce Advanced Vinson Release/node_modules/xmlbuilder/lib/XMLStringifier.js:140:16)
at XMLStringifier.assertLegalChar (/home/user/Downloads/SuiteCommerce Advanced Vinson Release/node_modules/xmlbuilder/lib/XMLStringifier.js:4:59)
at XMLStringifier.module.exports.XMLStringifier.eleName (/home/user/Downloads/SuiteCommerce Advanced Vinson Release/node_modules/xmlbuilder/lib/XMLStringifier.js:23:19)
at new XMLElement (/home/user/Downloads/SuiteCommerce Advanced Vinson Release/node_modules/xmlbuilder/lib/XMLElement.js:21:34)
at XMLDocument.module.exports.XMLNode.node (/home/user/Downloads/SuiteCommerce Advanced Vinson Release/node_modules/xmlbuilder/lib/XMLNode.js:155:15)
at XMLDocument.module.exports.XMLNode.element (/home/user/Downloads/SuiteCommerce Advanced Vinson Release/node_modules/xmlbuilder/lib/XMLNode.js:102:28)
at Object.module.exports.create (/home/user/Downloads/SuiteCommerce Advanced Vinson Release/node_modules/xmlbuilder/lib/index.js:22:16)
at Builder.exports.Builder.Builder.buildObject (/home/user/Downloads/SuiteCommerce Advanced Vinson Release/node_modules/xml2js/lib/xml2js.js:195:29)
at /home/user/Downloads/SuiteCommerce Advanced Vinson Release/gulp/tasks/font-awesome.js:66:21
Global npm modules have been purged. Skipping font-awesome(line 38 in gulpfile.js) skips the error.
here is the solution faced same issue yesterday
cd /usr/local tar --strip-components 1 -xzf /home/earth/node-v6.10.3-linux-x64.tar.gz
check the node version by node -v
Download Source code from file cabinet and extract it
Web Site Hosting Files > Live Hosting Files > SSP Applications > NetSuite Inc. - SCA Elbrus> Development > _Sources-->SuiteCommerce Advanced Elbrus Release.zip
Go to Root directory and type 'npm install' command to install node dependencies
Check you will get error in step 6, but npm rebuild node-sass
will resolve that.