简体   繁体   English

无法再次安装 cakephp 4

[英]cant install cakephp 4 again

I have wamp64, php 7.4 and using composer I ran this from the console我有 wamp64、php 7.4 并使用 composer 我从控制台运行它

composer create-project --prefer-dist "cakephp/app:^4.0" myapp作曲家 create-project --prefer-dist "cakephp/app:^4.0" myapp

and

composer create-project --prefer-dist cakephp/app:~4.0 my_app_name composer create-project --prefer-dist cakephp/app:~4.0 my_app_name

The installation cut out towards the end with this error安装结束时出现此错误

Script App\Console\Installer::postInstall handing the post create project cmd event terminated with an exception 

[Symfony\Component\Console\Exception\RunTimeException\ Aborted
and some Symfony runtime exception when you get to the set folder permission y/n 

It created this JSON file它创建了这个 JSON 文件

{
    "name": "cakephp/app",
    "description": "CakePHP skeleton app",
    "homepage": "https://cakephp.org",
    "type": "project",
    "license": "MIT",
    "require": {
        "php": ">=7.2",
        "cakephp/cakephp": "~4.2.0",
        "cakephp/migrations": "^3.0",
        "cakephp/plugin-installer": "^1.3",
        "mobiledetect/mobiledetectlib": "^2.8"
    },
    "require-dev": {
        "cakephp/bake": "^2.3",
        "cakephp/cakephp-codesniffer": "~4.2.0",
        "cakephp/debug_kit": "^4.4",
        "josegonzalez/dotenv": "^3.2",
        "phpunit/phpunit": "~8.5.0 || ^9.3",
        "psy/psysh": "@stable"
    },
    "suggest": {
        "markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.",
        "dereuromark/cakephp-ide-helper": "After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan/Psalm compatibility.",
        "phpstan/phpstan": "PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code."
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Test\\": "tests/",
            "Cake\\Test\\": "vendor/cakephp/cakephp/tests/"
        }
    },
    "scripts": {
        "post-install-cmd": "App\\Console\\Installer::postInstall",
        "post-create-project-cmd": "App\\Console\\Installer::postInstall",
        "check": [
            "@test",
            "@cs-check"
        ],
        "cs-check": "phpcs --colors -p  src/ tests/",
        "cs-fix": "phpcbf --colors -p src/ tests/",
        "stan": "phpstan analyse",
        "test": "phpunit --colors=always"
    },
    "prefer-stable": true,
    "config": {
        "sort-packages": true
    }
}

How to Fix Cakephp 4 Composer Install Error 如何修复 Cakephp 4 Composer 安装错误

(i didnt understand the solution to this) Cakephp 4 Windows Installation Issues (我不明白解决方案) Cakephp 4 Windows 安装问题

It should be possible to get it to work.应该可以让它工作。 What Windows version do you use?你用的是什么Windows版本? Pro or Home?专业版还是家用版? Which distribution?哪个分布? 2010? 2010 年? Please make sure to navigate to the WAMP install folder and then specifically the www folder.请确保导航到 WAMP 安装文件夹,然后特别是 www 文件夹。 The command I use is this;我使用的命令是这样的;

composer create-project --prefer-dist cakephp/app:~4.0 cake

It worked for me.它对我有用。 Alternatively, download Cakephp version 4.0, place the contents in the www folder, and configure it manually through the file /config/app.php.或者,下载Cakephp 4.0版本,将内容放在www文件夹中,通过文件/config/app.php手动配置。 If you want, we can look at it together.如果你愿意,我们可以一起看看。 There are not many people around me that can or want to work on Cakephp, so it'd be a pleasure.我周围没有多少人可以或想要在 Cakephp 上工作,所以很高兴。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM