Fix error Argument for ‘–moduleResolution’ option must be: ‘node’, ‘classic’, ‘node16’, ‘nodenext’.; in SonarQube with React TypeScript

Tiempo de lectura: < 1 minuto

Today we are going to learn how to solve the error Argument for ‘–moduleResolution’ option must be: ‘node’, ‘classic’, ‘node16’, ‘nodenext’.; when trying to analyze a React project with TypeScript using Sonarqube.

This error is located in the tsconfig.json file, as it includes:

    "moduleResolution": "bundle",

To fix it, we will set:

    "moduleResolution": "node",

Leave a Comment