Hi All,
I am an error while analysis the Typescript file using SonarTS plugin, can somebody please help in analyzing the error and please let me know what i am doing wrong.
below is the stack trace of the error
2:09:01.754 INFO - Sensor TypeScript Sensor [typescript]
22:09:04.266 ERROR - <path>\.sonar\sonarts-bundle\node_modules\tslint-sonarts\lib\runner\metrics.js:111
22:09:04.266 ERROR - return walkAndCountIf(sourceFile, node => navigation_1.is(node, ...FUNCTION_KINDS));
22:09:04.266 ERROR - ^^^
22:09:04.266 ERROR -
22:09:04.266 ERROR - SyntaxError: Unexpected token ...
22:09:04.266 ERROR - at exports.runInThisContext (vm.js:53:16)
22:09:04.266 ERROR - at Module._compile (module.js:373:25)
22:09:04.266 ERROR - at Object.Module._extensions..js (module.js:416:10)
22:09:04.266 ERROR - at Module.load (module.js:343:32)
22:09:04.266 ERROR - at Function.Module._load (module.js:300:12)
22:09:04.266 ERROR - at Module.require (module.js:353:17)
22:09:04.266 ERROR - at require (internal/module.js:12:17)
22:09:04.268 ERROR - at Object.<anonymous> (<path>\.sonar\sonarts-bundle\node_modules\tslint-sonarts\lib\runner\processRequest.js:24:19)
22:09:04.268 ERROR - at Module._compile (module.js:409:26)
22:09:04.268 ERROR - at Object.Module._extensions..js (module.js:416:10)
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 22.024s
Final Memory: 22M/131M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.IllegalStateException: Failed to run external process `node <path>\.sonar\sonarts-bundle\node_modules\tslint-sonarts\bin\tsrunner`. Run with -X for more information
at org.sonar.plugin.typescript.ExternalTypescriptSensor.executeExternalRunner(ExternalTypescriptSensor.java:191)
at org.sonar.plugin.typescript.ExternalTypescriptSensor.analyze(ExternalTypescriptSensor.java:118)
at org.sonar.plugin.typescript.ExternalTypescriptSensor.execute(ExternalTypescriptSensor.java:103)
at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:288)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:283)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:261)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more
Caused by: java.io.IOException: The pipe has been ended
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
at sun.nio.cs.StreamEncoder.implWrite(Unknown Source)
at sun.nio.cs.StreamEncoder.write(Unknown Source)
at sun.nio.cs.StreamEncoder.write(Unknown Source)
at java.io.OutputStreamWriter.write(Unknown Source)
at java.io.Writer.write(Unknown Source)
at org.sonar.plugin.typescript.ExternalTypescriptSensor.executeExternalRunner(ExternalTypescriptSensor.java:179)
... 37 more
ERROR:
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE