Error of Sonarqube Engine Check for CSS File: No File Name Extension
Symptom
A task checked by the sonarqube engine fails, and the log is displayed as shown in Figure 1.
Cause Analysis
When "type": "module" is set in the package.json file, the current sonarqube version has a bug where the CSS scanner fails to detect file extensions during imports. Therefore, CSS rules are not applied, and the server cannot start.
Solution
- Access the code repository in use.
- Delete "type": "module" from the package.json file.

- Create a file named sonar-project.properties in the root directory of the code repository.
- Enter the following code in the sonar-project.properties file:
sonar.working.directory=projectdir #projectdir is the relative directory of the project code. Ensure that package.json is not under the projectdir directory.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
