Template for a good bug report, formatted with Markdown:
versions used (SonarQube, Scanner, Plugin, and any relevant extension)
Community Edition Version 7.4 (build 18908)
I am using Team City as my CI.
SQ is being hosted in a Win Server 2012 R2. 12 gb of Ram. I have more than 50gig free.
When I have task manager RAM only 40% used
I have added several projects to SonarQube. Only a couple of project i encounter “Can not find typescript”
According to documentation I my version is higher than the min. requirements.
if you take a look at another issue I posted, it list all the plug-in installed and version. Out of memory: Java heap space
SonarTS, i.e. our plugin used to analyze TypeScript files, needs to have “TypeScript” node module available either globally or locally on your project.
Given you already have node.js installed on your machine, you have two options:
(Recommended) Running npm install before starting an analysis on each of your TS project to make TypeScript module available.
Install TypeScript globally by running npm install -g typescript
I tried installing it globally, but it did not work. I had to have the type script install on per build configuration. Good thing I am using templates.
Hi RyanK,
I am facing same error in my jenkins build while sonarscanner analyzing .ts file. I don’t know what exactly need to be done. I am familiar in sonar; but not in node.js. My very first question is: Is sonar using node.js to analyze .ts files? I tried installing it globally as > npm install -g typescript; but didn’t work.
I tried setting up our NODE_PATH by using “-Dsonar.typescript.node=” variable; but still facing the above error.
It would be great help if can guide me that how did you install type script on per build configuration? Thanks in Advance.
Its been a while. I do not full recall what we did to resolve the issue.
With was either upgrade or downgrade the plug-in and/or fix the windows environment path.
Remember this is a Java base tool. Most errors that kick out does not provide a good idea what the issue is and/or there is a version issue from Operating system, Java runtimes, plug-ins, etc…
I would suggest to make sure you have an update node and npm version.
npm -v
node -v
I have been having a difficulties trying to get the MS Build to run. Not getting that much support over here. I am going to look at another tool before I make any purchase.
After several attempts, I got SonarQube to work properly on Azure Devops.
Sonar worked only by installing the typescript module for each project. No need NODE_PATH variable.
For each project in the solution that has typescript code, run the following code in command line:
cd $(Build.SourcesDirectory)<PROJECT_FOLDER>
npm install typescript.
That does ring a bell. I double checked my Team City template and my PowerShell function. I do have a step to install typescript during the CI process. The PS script I am using is
npm install prerender-node --save;
Note: my PS script is a long switch statement with custom execution for CI build process… (ie… install type script, npm install commands, etc…). I did this so I only need to change 1 file and push that fill to all Team City Agents when things change instead of going to make changes to multiple process templates