Answers.Body: <p>I had the same problem, and I think it's simply likely to mean that civicrm is not installed in your new site. I solved the problem by re-running</p>
  <p><code>civibuild destroy mysitename</code></p>
  <p><code>civibuild create mysitename --url http://localhost:8080</code></p>
  <p>My initial install command contained an error which explains why civicrm was not downloaded/installed successfully. Short of doing a manual civicrm install via the CMS, there didn't seem an obvious way to fix a missing component from the buildkit install.</p>
  <p>If you're using docker, I think you need to prepend 'docker-compose exec -u buildkit civicrm' to those commands, or login to the docker container.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-13T19:47:51.807Z
Answers.LastActivityDate: 2021-08-14T19:19:21.420Z
Answers.LastEditDate: 2021-08-14T19:19:21.420Z
Answers.UserDisplayName: fred2
Body: <p>I have installed the CiviCRM buildkit using Docker. Then i deleted the docker image and installed the <a href="https://github.com/michaelmcandrew/civicrm-buildkit-docker" rel="nofollow noreferrer">buildkit</a> again using Docker but the installation failed. I have stated the error below</p>
  <pre><code>+++ '[' '!' -d /buildkit/build/dmaster/web/sites/all/modules/civicrm/bin -o '!' -d /buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM ']'
  +++ cvutil_fatal 'Failed to locate valid civi root: /buildkit/build/dmaster/web/sites/all/modules/civicrm'
  +++ echo 'Failed to locate valid civi root: /buildkit/build/dmaster/web/sites/all/modules/civicrm'
  Failed to locate valid civi root: /buildkit/build/dmaster/web/sites/all/modules/civicrm
  +++ exit 90
  </code></pre>
  <p>Thanks in advance.</p>
  
Tags: <civicrm-buildkit>
Title: How to resolve 'Failed to locate valid civi root' error?
ThreadText: # How to resolve 'Failed to locate valid civi root' error?
  
  (Asked by: username_0 on 2021-06-14)
  
  I have installed the CiviCRM buildkit using Docker. Then i deleted the docker image and installed the buildkit again using Docker but the installation failed. I have stated the error below
  +++ '[' '!' -d /buildkit/build/dmaster/web/sites/all/modules/civicrm/bin -o '!' -d /buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM ']'
  +++ cvutil_fatal 'Failed to locate valid civi root: /buildkit/build/dmaster/web/sites/all/modules/civicrm'
  +++ echo 'Failed to locate valid civi root: /buildkit/build/dmaster/web/sites/all/modules/civicrm'
  Failed to locate valid civi root: /buildkit/build/dmaster/web/sites/all/modules/civicrm
  +++ exit 90
  
  Thanks in advance.
  
  **Tags:** civicrm-buildkit
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-08-13. Score: 2
  
  I had the same problem, and I think it's simply likely to mean that civicrm is not installed in your new site. I solved the problem by re-running
  
  `civibuild destroy mysitename`
  
  `civibuild create mysitename --url http://localhost:8080`
  
  My initial install command contained an error which explains why civicrm was not downloaded/installed successfully. Short of doing a manual civicrm install via the CMS, there didn't seem an obvious way to fix a missing component from the buildkit install.
  
  If you're using docker, I think you need to prepend 'docker-compose exec -u buildkit civicrm' to those commands, or login to the docker container.
  
  
  ---
  
  