craft icon indicating copy to clipboard operation
craft copied to clipboard

Step 3 of Craft documentation Quick Start throwing error on install

Open sydneyhaggard opened this issue 11 months ago • 1 comments

Description

I began spinning up a new Craft 5 install and received "failed to open stream" error (see full error under Additional Info) when attempting to run the ddev composer create command in the Craft 5 documentation.

Image

Issue was resolved by adding --no-scripts to the command:

ddev composer create -y --no-scripts "craftcms/craft"

Steps to reproduce

See steps 1-3 under Craft 5 install Quick Start guide.

Additional info

Executing Composer command: [composer create-project craftcms/craft --no-install /tmp/sMTRzY]
 
Creating a "craftcms/craft" project at "/tmp/sMTRzY"
Installing craftcms/craft (5.3.2)
  - Installing craftcms/craft (5.3.2): Extracting archive
Created project in /tmp/sMTRzY
> @php -r "file_exists('.env') || copy('.env.example.dev', '.env');"
> @php -r "unlink('composer.json');"
> @php -r "rename('composer.json.default', 'composer.json');"
> @php craft install
PHP Warning:  require_once(/tmp/sMTRzY/vendor/autoload.php): Failed to open stream: No such file or directory in /tmp/sMTRzY/bootstrap.php on line 11

Warning: require_once(/tmp/sMTRzY/vendor/autoload.php): Failed to open stream: No such file or directory in /tmp/sMTRzY/bootstrap.php on line 11
PHP Fatal error:  Uncaught Error: Failed opening required '/tmp/sMTRzY/vendor/autoload.php' (include_path='.:/usr/share/php') in /tmp/sMTRzY/bootstrap.php:11
Stack trace:
#0 /tmp/sMTRzY/craft(8): require()
#1 {main}
  thrown in /tmp/sMTRzY/bootstrap.php on line 11

Fatal error: Uncaught Error: Failed opening required '/tmp/sMTRzY/vendor/autoload.php' (include_path='.:/usr/share/php') in /tmp/sMTRzY/bootstrap.php:11
Stack trace:
#0 /tmp/sMTRzY/craft(8): require()
#1 {main}
  thrown in /tmp/sMTRzY/bootstrap.php on line 11
Script @php craft install handling the post-create-project-cmd event returned with error code 255
Failed to create project:exit status 255, stderr= 
  • Craft version: Craft 5
  • PHP version: 8.2
  • Database driver & version: N/A
  • Plugins & versions: N/A

sydneyhaggard avatar Jan 23 '25 15:01 sydneyhaggard

Hey, Sydney! Sorry this didn't work for you. I know there were some changes in DDEV in the last month or so, vis à vis the create command (which is a wrapper around Composer’s create-project)… but as far as I know, the --no-scripts flag has been optional for some time.

What version of DDEV are you running?

ddev -v

AugustMiller avatar Feb 28 '25 01:02 AugustMiller