Gatsby: [Gatsby v2] commons.css 404 network error using gatsby develop

Created on 9 Jun 2018  ·  5Comments  ·  Source: gatsbyjs/gatsby

Description

I was working my way through the upgrade process to v2 for my website and wanted to report a network request error observed when using gatsby develop. gatsby build does not show this error.

Steps to reproduce

  1. Followed the v2 Upgrade guide
  2. Run gatsby develop and opened the browser
  3. Open the console or network tab
    screen shot 2018-06-09 at 1 41 28 pm

Expected result

  1. No console errors for a file not related the project

Actual result

  1. A 404 is seen for a file unrelated to the project

Environment

$ ./node_modules/.bin/gatsby info

  System:
    OS: macOS High Sierra 10.13.5
    CPU: x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 8.9.4 - /usr/local/bin/node
    Yarn: 1.5.1 - ~/.yarn/bin/yarn
    npm: 5.6.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 67.0.3396.79
    Firefox: 60.0.1
    Safari: 11.1.1
  npmPackages:
    gatsby: next => 2.0.0-alpha.51
    gatsby-cli: ^1.1.58 => 1.1.58
    gatsby-plugin-google-analytics: next => 1.0.20-10
    gatsby-plugin-react-helmet: next => 2.0.12-7
    gatsby-plugin-sitemap: next => 1.2.14-10
    gatsby-plugin-typography: next => 2.0.1-11

File contents (if changed)

gatsby-config.js:

module.exports = {
  siteMetadata: {
    title: 'The Greenhouse I/O',
    siteUrl: 'https://www.thegreenhouse.io',
    description: 'Personal / portfolio website for The Greenhouse.'
  },
  plugins: [
    'gatsby-plugin-typography', 
    'gatsby-plugin-sitemap',
    'gatsby-plugin-react-helmet',
    {
      resolve: 'gatsby-plugin-google-analytics',
      options: {
        trackingId: 'xxx',
        head: true
      }
    }
  ]
};

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

Thoughts

It seems the issue is likely coming from _webpack.config.js_

  • this is where the common is coming from
  • this looks to be where the file is made, reflecting the entry point name "common"

Everything works fine for my setup fwiw. Let me know how to help, hopefully this would be a simple fi and I could help out!

Thanks for everything and let me know if you need more info! The upgrade was straightforward for me and everything else is working as expected. 👍

All 5 comments

good find @nihgwu !

Happy to make a PR. What do you think the best course of action would be; remove that line? Make it conditional?

@thescientist13 Hah, you might be too late :) @nihgwu already opened PR to fix this - https://github.com/gatsbyjs/gatsby/pull/5837

closed via #5837

doh! There goes my chance for some swag! 😆

Nice work @nihgwu !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jimfilippou picture jimfilippou  ·  3Comments

brandonmp picture brandonmp  ·  3Comments

andykais picture andykais  ·  3Comments

KyleAMathews picture KyleAMathews  ·  3Comments

hobochild picture hobochild  ·  3Comments