0

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.

3 Answers3

0

here is the solution faced same issue yesterday

  1. You need to update the nodejs version to 'node-v6.10.3-linux-x64.tar.gz' if you are using 4.x.x or below (this works for me..) https://nodejs.org/dist/v6.10.3/
  2. To Install nodejs got to

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

  1. 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

  2. Go to Root directory and type 'npm install' command to install node dependencies

  3. Type gulp in same directory. If it gives you error regarding sass then type below commands npm rebuild node-sass

Check you will get error in step 6, but npm rebuild node-sass will resolve that.

Anup Chaudhary
  • 320
  • 1
  • 10
  • Using node v6.10.3 seems to resolve the issue for Vinson and Mont Blanc! I will make a note to ignore the dependency table https://developers.suitecommerce.com/section4183926623 – Christopher Webb May 12 '17 at 08:33
  • However, there is still an issue with Denali; I get a SASS issue that cannot be remedied by reinstalling node-sass and gulp-sass `You may not @extend an outer selector from within @media.` – Christopher Webb May 12 '17 at 08:38
  • @ChristopherWebb You can find the fix for the node-sass issue here: https://stackoverflow.com/a/41796973/2634663 – Andrés Andrade Jun 14 '17 at 01:20
0

SOURCE CODE ERROR.**strong text Error:** You may not @extend an outer selector from within @media. You may only @extend selectors within the same directive.

Solution: If this occurs, a mismatch of node-sass versions exists between the package.json files located in the top-level directory and the node_modules/gulp-sass directory. To fix this error, perform the following.

0

If you don't want to change your node version you can fix the issue adding the following dependency to your package.json:

"xmlbuilder": "8.2.2"

and reinstalling dependencies:

npm install

Andrés Andrade
  • 2,213
  • 2
  • 18
  • 23