Skip to content
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 Installing using composer #2114

Closed
crysaro opened this issue Jul 30, 2019 · 8 comments
Closed

Fatal error Installing using composer #2114

crysaro opened this issue Jul 30, 2019 · 8 comments
Labels
waiting for info Issues or pull requests that need further clarification from the author

Comments

@crysaro
Copy link

crysaro commented Jul 30, 2019

I got a fatal error in the browser after installing CodeIgniter using composer with the following command:
composer create-project codeigniter4/devstarter my_project_name -s dev
The error was:
Fatal error: require(): Failed opening required 'I:\\my_project_name\\app\\Config/../../vendor/codeigniter4/framework/system/bootstrap.php'
I checked the vendor folder and the "framework" folder /vendor/codeigniter4/ is missing. I only saw /vendor/codeigniter4/codeigniter4/.

I renamed the /vendor/codeigniter4/codeigniter4 to /vendor/codeigniter4/framework and there were no more errors.

@diegoldev
Copy link
Contributor

I think that is related with #1871 . Try running 'composer update' and check if fix it

@crysaro
Copy link
Author

crysaro commented Jul 31, 2019

Running 'composer update' did not fix it.
I created another test project.
composer create-project codeigniter4/devstarter testproj -s dev
After installing cd testproj
and run 'composer update' and there is still the error.

@MGatner
Copy link
Member

MGatner commented Aug 13, 2019

This is because of codeigniter4/devstarter#1, and it makes the devstarter unusable.

The quick fix is to open app/Config/Paths.php and change this line:

public $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system';

to this:

public $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/codeigniter4/system';

("framework" to "codeigniter4")

@jim-parry and I wrote about it a bit, but there's going to need to be a change to the release scripts in admin/ in order to fix this.

@jim-parry
Copy link
Contributor

devstarter is not created by the release scripts. I have updated its app/Config/Paths.php, which should fix the problem for new installs this way. Existing ones might need to manually update the path, as described aboce.

@jim-parry jim-parry added the waiting for info Issues or pull requests that need further clarification from the author label Aug 14, 2019
@jim-parry
Copy link
Contributor

Not hearing anything contrary in 6 days, I presume the fix works.

@davido242
Copy link

Thanks Guyz

@FabricioPatrocinio
Copy link

I use linux, so this worked for me:
composer update --ignore-platform-reqs

@raghavendrapb
Copy link

I have getting the fatal error. after updating composer also getting same error.

PHP Warning: require(/opt/lampp/htdocs/ci4/app/Config/../../vendor/codeigniter4/codeigniter4/system/bootstrap.php): Failed to open stream: No such file or directory in /opt/lampp/htdocs/ci4/spark on line 46
PHP Fatal error: Uncaught Error: Failed opening required '/opt/lampp/htdocs/ci4/app/Config/../../vendor/codeigniter4/codeigniter4/system/bootstrap.php' (include_path='.:/usr/share/php') in /opt/lampp/htdocs/ci4/spark:46
Stack trace:
#0 {main}
thrown in /opt/lampp/htdocs/ci4/spark on line 46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for info Issues or pull requests that need further clarification from the author
Projects
None yet
Development

No branches or pull requests

7 participants