title: Django collectstatic does not use the path specified by STATIC_ROOT
body: <p>In settings.py, I set the STATIC_ROOT as below:</p>
  <p>STATIC_URL = '/static/'</p>
  <p>MEDIA_URL = '/files/'</p>
  <p>STATIC_ROOT = BASE_DIR / &quot;staticfiles&quot;</p>
  <p>MEDIA_ROOT = BASE_DIR / 'uploads'</p>
  <p>when running the command:
  python3 manage.py collectstatic</p>
  <p>it works perfectly in my local development environment, it created a folder staticfiles, then collected all the files as expected, but when deploying the code on digitalOcean, it gives the error that says:</p>
  <pre><code>......
  
  for entry in os.scandir(path):
  
  FileNotFoundError: [Errno 2] No such file or directory: '/home/kevin/myproject/static'
  </code></pre>
  <p>I set the path with BASE_DIR / 'staticfiles',
  why it points to the  BASE_DIR / 'static'</p>
  <p>the path and folder: BASE_DIR / 'static' was use by</p>
  <p>STATICFILES_DIRS = [
  BASE_DIR / 'static'
  ]</p>
  <p>got so confused, debug it for a couple of days, it works in my local machine but not in production. any help is appreciated, thank you in advance.</p>