ERROR: ... /.scannerwork/css-bundle/node_modules/micromatch/index.js:44

Hello

We are seeing the following error below during our SQ scans run via Jenkins builds.

SonarQube 7.9.1
SonarScanner 4.0.0.1744
$ node --version
v8.2.1
SonarCSS plugin 1.1.1

22:53:05 INFO: ------------- Run sensors on module il-ordermgmt-app
22:53:05 INFO: Load metrics repository
22:53:06 INFO: Load metrics repository (done) | time=38ms
22:53:07 WARNING: An illegal reflective access operation has occurred
22:53:07 WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/home//.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) 22:53:07 WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
22:53:07 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
22:53:07 WARNING: All illegal access operations will be denied in a future release
22:53:09 INFO: Sensor SonarCSS Metrics [cssfamily]
22:53:09 INFO: Sensor SonarCSS Metrics [cssfamily] (done) | time=148ms
22:53:09 INFO: Sensor SonarCSS Rules [cssfamily]
22:53:11 ERROR: /home/
/jenkins/workspace/DEALC.il-ordermgmt-app.PR-MERGED.BUILD/.scannerwork/css-bundle/node_modules/micromatch/index.js:44
22:53:11 ERROR: let isMatch = picomatch(String(patterns[i]), { …options, onResult }, true);
22:53:11 ERROR: ^^^
22:53:11 ERROR:
22:53:11 ERROR: SyntaxError: Unexpected token …
22:53:11 ERROR: at createScript (vm.js:74:10)
22:53:11 ERROR: at Object.runInThisContext (vm.js:116:10)
22:53:11 ERROR: at Module._compile (module.js:533:28)
22:53:11 ERROR: at Object.Module._extensions…js (module.js:580:10)
22:53:11 ERROR: at Module.load (module.js:503:32)
22:53:11 ERROR: at tryModuleLoad (module.js:466:12)
22:53:11 ERROR: at Function.Module._load (module.js:458:3)
22:53:11 ERROR: at Module.require (module.js:513:17)
22:53:11 ERROR: at require (internal/module.js:11:18)
22:53:11 ERROR: at Object. (/home/****/jenkins/workspace/DEALC.il-ordermgmt-app.PR-MERGED.BUILD/.scannerwork/css-bundle/node_modules/stylelint/lib/isPathIgnored.js:4:20)
22:53:11 ERROR: Analysis didn’t terminate normally, please verify ERROR and WARN logs above. Exit code 1
22:53:11 INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=2211ms
22:53:11 INFO: Sensor JavaXmlSensor [java]
22:53:11 INFO: Sensor JavaXmlSensor [java] (done) | time=6ms

1 Like

@jaystan: Any solution for the above issue ?

hello @jaystan,

can you please rerun the analysis with debug output (adding -X to the sonar-scanner command should be sufficient) and post it here?

I am a bit surprised by this error, since let should be supported by your Node.js version

Part of the log where error appears in scan above.

**11:28:38** 11:28:37.087 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project 
**11:28:38** 11:28:37.087 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project 
**11:28:38** 11:28:37.093 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project 
**11:28:38** 11:28:37.094 DEBUG: 'VB.NET' skipped because there is no related file in current project **11:28:38** 11:28:37.096 DEBUG: 'VB.NET Tests Coverage Report Import' skipped because there is no related file in current project 
**11:28:38** 11:28:37.096 DEBUG: '[Deprecated] VB.NET Integration Tests Coverage Report Import' skipped because there is no related file in current project 
**11:28:38** 11:28:37.097 DEBUG: 'VB.NET Unit Test Results Import' skipped because there is no related file in current project 
**11:28:38** 11:28:37.097 DEBUG: 'CFamily' skipped because there is no related file in current project **11:28:38** 11:28:37.098 DEBUG: Sensors : SonarCSS Metrics -> SonarCSS Rules -> JavaXmlSensor -> HTML -> JaCoCo XML Report Importer -> SonarJS -> ESLint-based SonarJS -> SonarJS Coverage -> JavaSecuritySensor -> CSharpSecuritySensor -> PhpSecuritySensor **11:28:38** 11:28:37.100 INFO: Sensor SonarCSS Metrics [cssfamily] 
**11:28:38** 11:28:37.231 INFO: Sensor SonarCSS Metrics [cssfamily] (done) | time=132ms **11:28:38** 11:28:37.231 INFO: Sensor SonarCSS Rules [cssfamily] 
**11:28:38** 11:28:37.232 DEBUG: Deploying bundle to /home/****/jenkins/workspace/DEALC.il-ordermgmt-app.PR-OPENED.BUILD/.scannerwork

**11:28:39** 11:28:38.323 DEBUG: Using default Node.js executable: 'node'. 
**11:28:39** 11:28:38.324 DEBUG: Checking Node.js version 
**11:28:39** 11:28:38.335 DEBUG: Launching command [node, -v] 
**11:28:39** 11:28:38.366 DEBUG: Using Node.js v8.11.4. 
**11:28:39** 11:28:38.367 DEBUG: Starting process: node /home/****/jenkins/workspace/DEALC.il-ordermgmt-app.PR-OPENED.BUILD/.scannerwork/css-bundle/node_modules/stylelint/bin/stylelint /home/****/jenkins/workspace/DEALC.il-ordermgmt-app.PR-OPENED.BUILD/**/*{.css,.less,.scss,.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,php,php3,php4,php5,phtml,inc} --config /home/****/jenkins/workspace/DEALC.il-ordermgmt-app.PR-OPENED.BUILD/.scannerwork/css-bundle/stylelintconfig.json -f json 
**11:28:39** 11:28:38.367 DEBUG: Launching command [node, /home/****/jenkins/workspace/DEALC.il-ordermgmt-app.PR-OPENED.BUILD/.scannerwork/css-bundle/node_modules/stylelint/bin/stylelint, /home/****/jenkins/workspace/DEALC.il-ordermgmt-app.PR-OPENED.BUILD/**/*{.css,.less,.scss,.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,php,php3,php4,php5,phtml,inc}, --config, /home/****/jenkins/workspace/DEALC.il-ordermgmt-app.PR-OPENED.BUILD/.scannerwork/css-bundle/stylelintconfig.json, -f, json]

**11:28:45** 11:28:44.618 INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=7387ms **11:28:45** 11:28:44.618 INFO: Sensor JavaXmlSensor [java] 
**11:28:45** 11:28:44.620 INFO: Sensor JavaXmlSensor [java] (done) | time=2ms 
**11:28:45** 11:28:44.620 INFO: Sensor HTML [web] 
**11:28:45** 11:28:44.634 DEBUG: 'dist/build/rpmbuild/BUILD/il-ordermgmt-app-0.1.0/src/app/index.html' generated metadata with charset 'UTF-8'
 **11:28:45** 11:28:44.674 DEBUG: HtmlSensor: dist/build/rpmbuild/BUILD/il-ordermgmt-app-0.1.0/src/app/index.html: 0,0,6 
**11:28:45** 11:28:44.677 INFO: Sensor HTML [web] (done) | time=57ms 
**11:28:45** 11:28:44.677 INFO: Sensor JaCoCo XML Report Importer [jacoco] 
**11:28:45** 11:28:44.681 DEBUG: No reports found 
**11:28:45** 11:28:44.681 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=4ms **11:28:45** 11:28:44.681 INFO: Sensor SonarJS [javascript] 
**11:28:45** 11:28:44.688 INFO: 52 source files to be analyzed

hello @jaystan,

if I am not missing something, in your debug logs there is no error anymore? Did it disappear on second run?

Tibor…The error is no longer appearing. Weird. I will investigate what changed on my end.

One explanation would be that before the analysis run on older Node version (I think let was not supported in 6.x )