.js files are not available

I upgraded my Frappe v13 app to v14. To make portal pages work as usual, I have added extra Django tags to HTML pages inside the www folder:

  1. {% extends “templates/web.html” %}
  2. {% block script %}(referenced the index.js file in the same folder)
  3. {% block title %}
  4. {% block page_content %}
    In most cases, this is working fine. But for some www folders, .js files are not being served. Tried to access those .js files using URL, but running into 404 error.

Consider it as an extension of topic. As the issue was not resolved.

PS: Until now, .js files inside the following folders failed: update-profile, projects