I'm trying to install CakePHP3
I get an error and exit without a message prompting me to set permissions.
For the time being, the folder has been created, so when I display it in the browser, an error is displayed.

I searched variously, but I couldn't find a solution, so I would appreciate it if you could teach me.

macOS 10.15.7
composer 2.0.7

Contents at the time of installation

[vagrant @ localhost html] $php composer.phar create-project --prefer-dist cakephp/app: 3.9. * myProject
Creating a "cakephp/app: 3.9. *" project at "./myProject"
Installing cakephp/app (3.9.0)
  --Installing cakephp/app (3.9.0): Extracting archive
Created project in/vagrant/myProject
Loading composer repositories with package information
Updating dependencies
Lock file operations: 83 installs, 0 updates, 0 removals
  --Locking ajgl/breakpoint-twig-extension (0.3.4)
  --Locking aptoma/twig-markdown (2.0.0)
  --Locking asm89/twig-cache-extension (1.4.0)
  --Locking aura/intl (3.0.0)
  --Locking cakephp/bake (1.12.0)
  --Locking cakephp/cakephp (3.9.4)
  --Locking cakephp/cakephp-codesniffer (3.3.0)
  --Locking cakephp/chronos (1.3.0)
  --Locking cakephp/debug_kit (3.22.4)
  --Locking cakephp/migrations (2.4.2)
  --Locking cakephp/plugin-installer (1.3.1)
  --Locking composer/ca-bundle (1.2.8)
  --Locking composer/composer (1.10.17)
  --Locking composer/semver (1.7.1)
  --Locking composer/spdx-licenses (1.5.4)
  --Locking composer/xdebug-handler (1.4.5)
  --Locking dnoegel/php-xdg-base-dir (v0.1.1)
  --Locking doctrine/instantiator (1.4.0)
  --Locking jasny/twig-extensions (v1.2.0)
  --Locking jdorn/sql-formatter (v1.2.17)
  --Locking josegonzalez/dotenv (3.2.0)
  --Locking justinrainbow/json-schema (5.2.10)
  --Locking laminas/laminas-diactoros (1.8.7p2)
  --Locking laminas/laminas-zendframework-bridge (1.1.1)--Locking m1/env (2.2.0)
  --Locking mobiledetect/mobiledetectlib (2.8.34)
  --Locking myclabs/deep-copy (1.10.2)
  --Locking nikic/php-parser (v4.10.2)
  --Locking paragonie/random_compat (v9.99.99)
  --Locking phar-io/manifest (1.0.1)
  --Locking phar-io/version (1.0.1)
  --Locking phpdocumentor/reflection-common (2.2.0)
  --Locking phpdocumentor/reflection-docblock (5.2.2)
  --Locking phpdocumentor/type-resolver (1.4.0)
  --Locking phpspec/prophecy (v1.10.3)
  --Locking phpunit/php-code-coverage (5.3.2)
  --Locking phpunit/php-file-iterator (1.4.5)
  --Locking phpunit/php-text-template (1.2.1)
  --Locking phpunit/php-timer (1.0.9)
  --Locking phpunit/php-token-stream (2.0.2)
  --Locking phpunit/phpunit (6.5.14)
  --Locking phpunit/phpunit-mock-objects (5.0.10)
  --Locking psr/container (1.0.0)
  --Locking psr/http-message (1.0.1)
  --Locking psr/log (1.1.3)
  --Locking psr/simple-cache (1.0.1)
  --Locking psy/psysh (v0.10.4)
  --Locking robmorgan/phinx (0.11.7)
  --Locking sebastian/code-unit-reverse-lookup (1.0.1)
  --Locking sebastian/comparator (2.1.3)
  --Locking sebastian/diff (2.0.1)
  --Locking sebastian/environment (3.1.0)
  --Locking sebastian/exporter (3.1.2)
  --Locking sebastian/global-state (2.0.0)
  --Locking sebastian/object-enumerator (3.0.3)
  --Locking sebastian/object-reflector (1.1.1)
  --Locking sebastian/recursion-context (3.0.0)
  --Locking sebastian/resource-operations (1.0.0)
  --Locking sebastian/version (2.0.1)
  --Locking seld/jsonlint (1.8.3)
  --Locking seld/phar-utils (1.1.1)
  --Locking squizlabs/php_codesniffer (3.5.8)
  --Locking symfony/config (v5.1.8)
  --Locking symfony/console (v5.1.8)
  --Locking symfony/deprecation-contracts (v2.2.0)
  --Locking symfony/filesystem (v5.1.8)--Locking symfony/finder (v5.1.8)
  --Locking symfony/polyfill-ctype (v1.20.0)
  --Locking symfony/polyfill-intl-grapheme (v1.20.0)
  --Locking symfony/polyfill-intl-normalizer (v1.20.0)
  --Locking symfony/polyfill-mbstring (v1.20.0)
  --Locking symfony/polyfill-php73 (v1.20.0)
  --Locking symfony/polyfill-php80 (v1.20.0)
  --Locking symfony/process (v5.1.8)
  --Locking symfony/service-contracts (v2.2.0)
  --Locking symfony/string (v5.1.8)
  --Locking symfony/var-dumper (v5.1.8)
  --Locking symfony/yaml (v5.1.8)
  --Locking theseer/tokenizer (1.2.0)
  --Locking twig/twig (v1.44.1)
  --Locking umpirsky/twig-php-function (v0.1)
  --Locking webmozart/assert (1.9.1)
  --Locking wyrihaximus/twig-view (4.3.8)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 83 installs, 0 updates, 0 removals
  --Installing cakephp/plugin-installer (1.3.1): Extracting archive
Plugin initialization failed (include (/vagrant/myProject/vendor/cakephp/plugin-installer/src/Plugin.php): failed to open stream: No such file or directory), uninstalling plugin
  --Remove cakephp/plugin-installer (1.3.1)
    Install of cakephp/plugin-installer failed

  Could not delete/vagrant/myProject/vendor/cakephp/plugin-installer/tests:

create-project [-s | --stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [ --dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [-] [<package>] [<directory>] [<version>]
[vagrant @ localhost html] $

Plugin initialization failed or
failed to open stream:
Install of cakephp/plugin-installer failed
I searched for it, but I couldn't find a solution.

Display on browser

Warning: require (/vagrant/myProject/vendor/autoload.php): failed to open stream: No such file or directory in /vagrant/myProject/webroot/index.php on line 31
Fatal error: require (): Failed opening required'/vagrant/myProject/vendor/autoload.php'(include_path='.:/usr/share/pear:/usr/share/php') in/vagrant/myProject/webroot /index.php on line 31

I checked the file
autoload.php did not exist.
Is it because it ended in the middle of installation?

Sorry to trouble you, but thank you.

  • Answer # 1

    Thank you for your answer.
    I haven't resolved the error,
    By skipping Plugins with --no-plugins
    I proceeded to change the permissions, and I was able to display it for the time being.

    $php composer.phar create-project --prefer-dist --no-plugins cakephp/app: ^ 3.9 myProject

  • Answer # 2

    Host machine and virtual machine/ vagrantSince the directory sharing is not bidirectional, from the virtual machine/ vagrantIt is presumed that the file cannot be generated under the directory.

    Look it up with the keyword "vagrant shared folder mac".