Error: Cannot find module 'typescript'

Hi @RyanK,

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

Hope it clarifies.

Andrea