Yii2 errors – Failed to clone the git and “extra.asset-installer-paths” option is deprecated`
Error 1. The “extra.asset-installer-paths” option is deprecated, use the “config.fxp-asset.installer-paths” option
- Update composer.json by removing asset-installer-paths and add fxp-assets
-
123456789101112131415161718192021222324{..."extra": {"yii\\composer\\Installer::postCreateProject": {"setPermission": [{"runtime": "0777","web/assets": "0777","yii": "0755"}],"generateCookieValidationKey": ["config/web.php"]}},"fxp-asset": {"installer-paths": {"npm-asset-library": "vendor/npm","bower-asset-library": "vendor/bower"}}...}
Error 2. Failed to clone the [email protected]:jquery/jquery-dist.git repository, try running in interactive mode so that you can enter your GitHub credentials
- Add composer repository to composer.json
-
12345678910{..."repositories": [{"type": "composer","url": "https://asset-packagist.org"}],...}
Error messages
1 2 3 4 5 6 7 8 9 10 11 12 13 |
The "extra.asset-installer-paths" option is deprecated, use the "config.fxp-asset.installer-paths" option Loading composer repositories with package information Updating dependencies (including require-dev) Failed to clone the git@github.com:jquery/jquery-dist.git repository, try running in interactive mode so that you can enter your GitHub credentials [Composer\Repository\InvalidRepositoryException] No valid bower.json was found in any branch or tag of https://github.com/jquery/jquery-dist.git, could not load a package from it. install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]... ERROR: Service 'project' failed to build: The command '/bin/sh -c /usr/local/bin/composer install --prefer-dist --no-interaction' returned a non-zero code: 1 |
Updated composer.json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
{ ... "config": { "process-timeout": 1800 }, "repositories": [ { "type": "composer", "url": "https://asset-packagist.org" } ], "scripts": { "post-create-project-cmd": [ "yii\\composer\\Installer::postCreateProject" ] }, "extra": { "yii\\composer\\Installer::postCreateProject": { "setPermission": [ { "runtime": "0777", "web/assets": "0777", "yii": "0755" } ], "generateCookieValidationKey": [ "config/web.php" ] } }, "fxp-asset": { "installer-paths": { "npm-asset-library": "vendor/npm", "bower-asset-library": "vendor/bower" } } } |