Skip to content

Instantly share code, notes, and snippets.

@beaverbuilder
Last active May 6, 2019 19:09
Show Gist options
  • Save beaverbuilder/8ab6fd1f054582a1fe5ae053c3b75a55 to your computer and use it in GitHub Desktop.
Save beaverbuilder/8ab6fd1f054582a1fe5ae053c3b75a55 to your computer and use it in GitHub Desktop.
This snippet is used in the following knowledge base article – https://kb.wpbeaverbuilder.com/article/220-installl-beaver-builder-via-composer
{
"type": "package",
"package": {
"name": "beaver-builder/bb-plugin",
"type": "wordpress-plugin",
"version": "<VERSION_NUMBER>",
"dist": {
"type": "zip",
"url": "https://updates.wpbeaverbuilder.com/?fl-api-method=composer_download&download=bb-plugin-<VERSION>.zip&license=<LICENSE_KEY>"
},
"require": {
"composer/installers": "v1.6.5"
}
}
}
{
"type": "package",
"package": {
"name": "beaver-builder/bb-theme",
"type": "wordpress-theme",
"version": "<VERSION_NUMBER>",
"dist": {
"type": "zip",
"url": "https://updates.wpbeaverbuilder.com/?fl-api-method=composer_download&download=bb-theme.zip&license=<LICENSE_KEY>"
},
"require": {
"composer/installers": "v1.6.5"
}
}
}
{
"type": "package",
"package": {
"name": "beaver-builder/bb-theme-builder",
"type": "wordpress-plugin",
"version": "<VERSION_NUMBER>",
"dist": {
"type": "zip",
"url": "http://updates.wpbeaverbuilder.com/?fl-api-method=composer_download&download=bb-theme-builder.zip&license=<LICENSE_KEY>"
},
"require": {
"composer/installers": "v1.6.5"
}
}
}
@briankelleher
Copy link

These did not work for me.

I receive the following error:

./www/content/plugins/bb-plugin/fbd2ddce4cf1cb669d6caa036ee0f763]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of ./www/content/plugins/bb-plugin/fbd2ddce4cf1cb669d6caa036ee0f763 or
        ./www/content/plugins/bb-plugin/fbd2ddce4cf1cb669d6caa036ee0f763.zip, and cannot find ./www/content/plugins/bb-plugin/fbd2ddce4cf1cb669d6caa036ee0f763.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class

Installation failed, reverting ./composer.json to its original content.

I tried composer clearcache to see if my cached version was causing it to fail - no dice.

In my composer.json, I have this in the repositories field:

{
            "type": "package",
            "package": {
                "name": "beaver-builder/bb-plugin",
                "type": "wordpress-plugin",
                "version": "2.1.4",
                "dist": {
                    "type": "zip",
                    "url": "https://updates.wpbeaverbuilder.com/?fl-api-method=composer_download&amp;download=bb-plugin-pro.zip&amp;license=REDACTED"
                },
                "require": {
                    "composer/installers": "~1.5.0"
                }
            }
        }

I also have other plugins installing fine/to the correct directory with composer/installers.

Any ideas?

@briankelleher
Copy link

A bit more with composer -vvv require beaver-builder/bb-plugin

Installs: beaver-builder/bb-plugin:2.1.4
  - Installing beaver-builder/bb-plugin (2.1.4): Downloading https://updates.wpbeaverbuilder.com/?fl-api-method=composer_download&amp;download=bb-plugin-pro.zip&amp;license=REDACTED
Downloading (100%)Writing /Users/REDACTED/.composer/cache/files/beaver-builder/bb-plugin/00fcf25c08dc86222a66f980ebf28c3cd21bff5c.zip into cachefrom ./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1

 Extracting archiveExecuting command (CWD): unzip -qq  './www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1' -d '/Users/REDACTED/Sites/REDACTED/vendor/composer/dd18bb64'
    Failed to execute unzip -qq  './www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1' -d '/Users/REDACTED/Sites/REDACTED/vendor/composer/dd18bb64'

[./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of ./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1 or
        ./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1.zip, and cannot find ./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class

    Invalid zip file ('./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1' is not a zip archive.), retrying...
  - Installing beaver-builder/bb-plugin (2.1.4): Downloading https://updates.wpbeaverbuilder.com/?fl-api-method=composer_download&amp;download=bb-plugin-pro.zip&amp;license=REDACTED
Downloading (100%)Writing /Users/REDACTED/.composer/cache/files/beaver-builder/bb-plugin/00fcf25c08dc86222a66f980ebf28c3cd21bff5c.zip into cachefrom ./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1

 Extracting archiveExecuting command (CWD): unzip -qq  './www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1' -d '/Users/REDACTED/Sites/REDACTED/vendor/composer/dd18bb64'
    Failed to execute unzip -qq  './www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1' -d '/Users/REDACTED/Sites/REDACTED/vendor/composer/dd18bb64'

[./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of ./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1 or
        ./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1.zip, and cannot find ./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class

    Invalid zip file ('./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1' is not a zip archive.), retrying...
  - Installing beaver-builder/bb-plugin (2.1.4): Downloading https://updates.wpbeaverbuilder.com/?fl-api-method=composer_download&amp;download=bb-plugin-pro.zip&amp;license=REDACTED
Downloading (100%)Writing /Users/REDACTED/.composer/cache/files/beaver-builder/bb-plugin/00fcf25c08dc86222a66f980ebf28c3cd21bff5c.zip into cachefrom ./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1

 Extracting archiveExecuting command (CWD): unzip -qq  './www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1' -d '/Users/REDACTED/Sites/REDACTED/vendor/composer/dd18bb64'
    Failed to execute unzip -qq  './www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1' -d '/Users/REDACTED/Sites/REDACTED/vendor/composer/dd18bb64'

[./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of ./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1 or
        ./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1.zip, and cannot find ./www/content/plugins/bb-plugin/f52ae2cee628c573b155fe76db842ed1.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class

Installation failed, reverting ./composer.json to its original content.

@emaildano
Copy link

@beaverbuilder, Just a quick edit.

https://gist.github.com/beaverbuilder/8ab6fd1f054582a1fe5ae053c3b75a55#file-composer-beaver-themer-config-json:9

"url": "http://updates...

should be

"url": "https://updates...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment