This is my first post, I just started to learn and use Drupal, and I wish to install a fresh new site on my local Windows machine using composer. The issue is that it has a file not found error from the path "/sites/default/files/js/js_xxxx.js", I have searched through some forums and some of the users said that it is related to permission, but in my case, the file doesn't even exist in the directory. The problem now is, the site is able to start but when I enter the site, there is no style, all contents are displayed as plain text only. Have anyone faced this before? Thank you for helping!

I have also tried to reinstall it multiple times, but the issue remains. However, I am able to install and run it without a problem through XAMPP.

My website's landing page

  • The file does not exist due to missing write permissions.
    – Hudri
    Commented Jul 28, 2023 at 10:21
  • @Hudri I have tried to run the Windows Terminal using admin right. Is it the right way? Commented Jul 28, 2023 at 10:38
  • I don't know what you are talking about. Maybe you're misunderstanding who needs the permissions: This file is not created by you or composer, it is created dynamically by Drupal (= the webserver/apache/xampp user). The webserver must be allowed to write files into ....your_root.../web/sites/default/files
    – Hudri
    Commented Jul 28, 2023 at 10:52
  • Please be aware that XAMPP is considered old technology by the Drupal community and that there is a movement to drop official support for Windows.
    – mona lisa
    Commented Jul 28, 2023 at 11:06
  • @Hudri Yes, sorry for not making it clear enough, I have followed the right way to install it (I guess?). But inside the `project/web/sites/default/files' directory, it only contains three folders: config_xxxxx, php, and styles, while it should also contain: js, and css folders, which mine does not have in this case, when using composer to install. So I just don't understand why. Commented Jul 28, 2023 at 11:08

1 Answer 1


I had the same problem with Drupal 10. You can try several things to check if this isn't what's causing the problem:

  1. From the performance page ("admin/config/development/performance"), uncheck "Aggregate CSS files" and "Aggregate JavaScript files".
  2. If it still doesn't work, check the permissions (chmod 777 -R of your sites/default/files folder to be sure, then give it back with the permission you want, as well as the user profile with ls -l).

UPDATE: The aggregation fix for people who have this problem with Drupal10 comes from a problem with Nginx (it solved that I had with aggregation)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.