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

Default starter not upgrading to latest Gatsby packages #17591

Closed
MWalid opened this issue Sep 12, 2019 · 3 comments
Closed

Default starter not upgrading to latest Gatsby packages #17591

MWalid opened this issue Sep 12, 2019 · 3 comments
Assignees
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@MWalid
Copy link

MWalid commented Sep 12, 2019

I disconnected my internet, refreshed https://www.gatsbyjs.org and got site cannot be reached!

Even tried with gatsby-default-starter, enabled gatsby-plugin-offline on https site, and still, the site is not served when offline! https://thetechchannels.com/bc/

I was expecting 100% offline support, something like: https://deanhume.com/create-a-really-really-simple-offline-page-using-service-workers/, but maybe I'm not getting the idea behind gatsby-plugin-offline.

Summary

gatsby-plugin-offline does not serve sites when offline.

File contents (if changed)

gatsby-config.js:

module.exports = {
  siteMetadata: {
    title: `Gatsby Default Starter`,
    description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
    author: `@gatsbyjs`,
  },
  plugins: [
    `gatsby-plugin-react-helmet`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `images`,
        path: `${__dirname}/src/images`,
      },
    },
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `gatsby-starter-default`,
        short_name: `starter`,
        start_url: `/`,
        background_color: `#663399`,
        theme_color: `#663399`,
        display: `minimal-ui`,
        icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
      },
    },
    // this (optional) plugin enables Progressive Web App + Offline functionality
    // To learn more, visit: https://gatsby.dev/offline
    `gatsby-plugin-offline`,
  ],
}

package.json: N/A
gatsby-node.js: N/A
gatsby-browser.js: N/A
gatsby-ssr.js: N/A

@LekoArts LekoArts added the type: bug An issue or pull request relating to a bug in Gatsby label Sep 13, 2019
@vtenfys
Copy link
Contributor

vtenfys commented Sep 13, 2019

Hey there, thanks for opening this!

The issue you've reported was actually fixed in #17408 - however, there seems to be an issue on our side that the default starter is still using v2 of the offline plugin, rather than v3 which has been released with this fix.

For now just run yarn upgrade --latest or yarn install gatsby-plugin-offline@latest inside your repository, which should fix the issue.

@vtenfys vtenfys changed the title Gatsby plugin offline not serving sites when offline Default starter not upgrading to latest Gatsby packages Sep 13, 2019
@MWalid
Copy link
Author

MWalid commented Sep 13, 2019

Thanks for your response, great news its been resolved!

@vtenfys
Copy link
Contributor

vtenfys commented Sep 18, 2019

Closed in #16840

@vtenfys vtenfys closed this as completed Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

3 participants