Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gatsby-plugin-manifest] Error: Array Methods must be provided an Array #8126

Closed
williamtstanley opened this issue Sep 13, 2018 · 2 comments
Closed
Labels
type: question or discussion Issue discussing or asking a question about Gatsby

Comments

@williamtstanley
Copy link
Contributor

#4865

Description

Attempting to add manifest plugin following the 'Automatic' settings from the documentation.

Steps to reproduce

npm install --save gatsby-plugin-manifest

Added plugin settings to config:

{
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `FitplanApp`,
        short_name: `FitplanApp`,
        start_url: `/`,
        background_color: `#e6e6e6`,
        theme_color: `#00000`,
        display: `minimal-ui`,
        icon: `src/data/images/icon.png`, // This path is relative to the root of the site.
      },
    }

Expected result

Plugin generates valid manifest for the site as per documentation

Actual result

Build fails with:

Oh no, error occured:  Error: Array Methods must be provided an Array
    at validationError (/home/travis/Development/fitplan/website/node_modules/es6-promise/dist/es6-promise.js:481:10)
    at new Enumerator (/home/travis/Development/fitplan/website/node_modules/es6-promise/dist/es6-promise.js:509:28)
    at Function.all (/home/travis/Development/fitplan/website/node_modules/es6-promise/dist/es6-promise.js:626:10)
    at tokenPromise.then.res (/home/travis/Development/fitplan/website/plugins/gatsby-source-fitplan/gatsby-node.js:104:20)
    at tryCatcher (/home/travis/.nvm/versions/node/v10.9.0/lib/node_modules/gatsby-cli/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/travis/.nvm/versions/node/v10.9.0/lib/node_modules/gatsby-cli/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/travis/.nvm/versions/node/v10.9.0/lib/node_modules/gatsby-cli/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/travis/.nvm/versions/node/v10.9.0/lib/node_modules/gatsby-cli/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/travis/.nvm/versions/node/v10.9.0/lib/node_modules/gatsby-cli/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/home/travis/.nvm/versions/node/v10.9.0/lib/node_modules/gatsby-cli/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/home/travis/.nvm/versions/node/v10.9.0/lib/node_modules/gatsby-cli/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/home/travis/.nvm/versions/node/v10.9.0/lib/node_modules/gatsby-cli/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:693:18)
    at tryOnImmediate (timers.js:664:5)
    at processImmediate (timers.js:646:5)

Environment

System:
OS: Linux 4.15 Pop!_OS 18.04 LTS
CPU: x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Shell: 4.4.19 - /bin/bash
Binaries:
Node: 10.9.0 - ~/.nvm/versions/node/v10.9.0/bin/node
npm: 6.2.0 - ~/.nvm/versions/node/v10.9.0/bin/npm
Browsers:
Chrome: 68.0.3440.106
Firefox: 61.0.1
npmPackages:
gatsby: next => 2.0.0-rc.21
gatsby-image: ^2.0.0-rc.1 => 2.0.0-rc.2
gatsby-plugin-emotion: next => 2.0.0-rc.5
gatsby-plugin-facebook-analytics: ^1.0.3 => 1.0.3
gatsby-plugin-google-analytics: ^1.0.31 => 1.0.31
gatsby-plugin-manifest: ^1.0.27 => 1.0.27
gatsby-plugin-netlify: next => 2.0.0-rc.6
gatsby-plugin-offline: ^1.0.18 => 1.0.18
gatsby-plugin-react-helmet: next => 3.0.0-rc.1
gatsby-plugin-robots-txt: ^1.2.0 => 1.3.0
gatsby-plugin-sass: next => 2.0.0-rc.2
gatsby-plugin-sharp: ^2.0.0-rc.7 => 2.0.0-rc.7
gatsby-plugin-stripe-elements: ^1.0.7 => 1.0.8
gatsby-source-filesystem: ^2.0.1-rc.6 => 2.0.1-rc.6
gatsby-transformer-sharp: ^2.1.1-rc.3 => 2.1.1-rc.3
npmGlobalPackages:
gatsby-cli: 1.1.58

@williamtstanley
Copy link
Contributor Author

williamtstanley commented Sep 13, 2018

Follow up: If I manually add the "default" list of icons to the settings it works as expected.
though if I add the gatsby-pulgin-offline AFTER the manifest plugin as recommended it throws the same error again.

@kakadiadarpan
Copy link
Contributor

Hi @williamtstanley, I observed that some of the plugins that you have installed are not compatible with Gatsby v2.

gatsby-plugin-facebook-analytics: ^1.0.3 => 1.0.3
gatsby-plugin-google-analytics: ^1.0.31 => 1.0.31
gatsby-plugin-manifest: ^1.0.27 => 1.0.27
gatsby-plugin-offline: ^1.0.18 => 1.0.18

Can you try upgrading them to the next version? That might fix this issue for you.

@kakadiadarpan kakadiadarpan added the type: question or discussion Issue discussing or asking a question about Gatsby label Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question or discussion Issue discussing or asking a question about Gatsby
Projects
None yet
Development

No branches or pull requests

2 participants