-
Notifications
You must be signed in to change notification settings - Fork 941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: require(): Failed opening required 'preflight.inc' #165
Comments
Can you share some information about your environment? What is your drush and php version? Thanks! |
I'm running drupal on MAMP with PHP 7.0 and drush version 8.1.2 and everything works fine except for drush (have not tried drupal console yet). Thanks for the help! |
I found out another thing that could help solve my issue. I hardcoded the right path to preflight.inc into drush.php and which drush tells me it is using a global drush (/usr/local/lib/drush/drush) instead of the local dependency drush. |
@projekt8 The global drush dispatches the command to the local drush automatically, just make sure that your global drush is up to date. The feature has been added a few months ago. |
@webflo local and global drush have the same version (8.1.2) but auto dispatching doesnt seem to work |
Same happening for me. But the funny thing is, that I have a working copy with almost same file structure, and same files indeed, and one is working, another is not. UPDATE: My problem was, that I used a not-symlink friend copy mechanism, and the symlinks were replaced with the actual files. That's why the include command tried to load from the wrong directory. |
Just in case anyone else lands here like I did, my error was a mistyped PATH (using XAMPP and Windows) |
Found this after searching for the same error message. The problem, and solution, lay in my environment setup as I am running a multi-site instance on a 1&1 shared Linux hosting package.
Hope this helps others |
If you come across this problem (or a similar message about startup.inc, or drupal.php when attempting to run Drupal Console), be sure the contents of vendor/bin are actually symlinks. Moving a project to a new laptop, the actual PHP scripts were copied to vendor/bin rather than the symlinks, which caused this error for me (the include paths in the scripts are no longer valid in that case). The following steps resolved the issue for me:
|
My problem also was that the files instead of the symlinks were in the /vendor/bin directory. Running the script from the erronous /vendor/bin dir leads to mismatched directory structure. |
Just to add my 2 cents: I had this very same issue because I ran "composer update" on my initial project instead of running "composer install". The update pulled in all the files into the bin directory but they were not symlinks. I followed Andy's steps and that fixed the issue. |
I've encountered a problem when using drush. It seems that the DIR variable doesn't point to the right directory.
It should point to '/vendor/drush/drush/includes/' (that's where the preflight.inc is) instead of '/vendor/bin/includes/'.
Here is the error I get:
Warning: require(/Users/xxx/xxx/drupal/vendor/bin/includes/preflight.inc): failed to open stream: No such file or directory in /Users/xxx/xxx/drupal/vendor/bin/drush.php on line 11
Fatal error: require(): Failed opening required '/Users/xxx/xxx/drupal/vendor/bin/includes/preflight.inc' (include_path='.:') in /Users/xxx/xxx/drupal/vendor/bin/drush.php on line 11
I hope someone can help me (I'm more a frontend- than a backend-dev).
Thanks in advance!
The text was updated successfully, but these errors were encountered: