Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Installation & Hosting

Error on first run After Composer install. Undefined Constant

first-time

Started by Mike 3 years ago · 7 replies · 709 views
3 years ago

I installed Via composer and hit a bunch of issues, but now I am stuck at this error:

TXT
Undefined constant "Grav\Plugin\Problems\GRAV_SYSTEM_PATH"
3 years ago

I assume installing via Composer will not install required plugins. Try executing step 3 from GH install tutorial

  1. Install the plugin and theme dependencies by using the Grav CLI application bin/grav:

    BASH
    cd ~/webroot/grav
    bin/grav install
    

This will automatically clone the required dependencies from GitHub directly into this Grav installation.

3 years ago

@Karmalakas,

I assume installing via Composer will not install required plugins.

That's an incorrect assumption...

After running $ composer create-project getgrav/grav ./site-tmp, Grav is installed correctly on my machine and http://localhost/grav/site-tmp is showing the site.

@mikejones3,
I cannot reproduce the issue. Not when using composer, and not when cloning Github.

👍 1
last edited 07/26/23 by pamtbaau
3 years ago

So I actually ran the permissions script. Before this issue I could access at all. I ran the permissions script then got to this error.

not sure if this helps:

image|690x283

3 years ago

It looks like you solved some of the "bunch of issues" after installing using composer. That attitude is fine however it may lead nowhere and it should not be needed. As @pamtbaau pointed out Grav installs fine.

So the problem lies in your local dev environment and that is something which is hard to debug for the folks here in this forum.

Do you have a specific need to install via composer? Have you tried installing from zip or by git clone?

3 years ago

@bleutzinn:
Do you have a specific need to install via composer? Have you tried installing from zip or by git clone?

I had tried via zip before on a different server build. I re-built this server from scratch, and just started with composer. Maybe I will try nuking the composer install and try via git again.

3 years ago

Regarding the initial error upon installing with composer this issue looks similar and might provide some clues.

In that issue at some point the OP describes having changed two path constants. I would like to stress that such a thing isn't necessary to install Grav. If one thinks such measures are needed then it is just a signal something is off with the server.

3 years ago

@mikejones3, The issue also suggests...

it seems that clearing OPcache by restarting PHP-FPM, which I randomly thought of, actually did the job.

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by antoinep, 11 hours ago
5 59 5 hours ago
Installation & Hosting · by Jürgen Dietrich, 7 months ago
0 60 7 months ago
Installation & Hosting · by rappluk, 8 months ago
0 61 8 months ago
Installation & Hosting · by N, 12 months ago
3 71 12 months ago
Installation & Hosting · by Youle, 1 year ago
1 60 1 year ago