Gatsby: [gatsby-plugin-emotion] old 3.x files published in 4.0.2 build

Created on 1 Feb 2019  路  5Comments  路  Source: gatsbyjs/gatsby

Description

gatsby-plugin-emotion 4.0.2 is breaking builds where 4.0.1 succeeded. It appears some old files from 3.x (gatsby-browser.js, gatsby-ssr.js, and wrap-element.js) somehow made it into the published package. These files were deleted in #10500.

Compare 4.0.1 to 4.0.2 on unpkg:

https://unpkg.com/[email protected]/ (correct)
https://unpkg.com/[email protected]/ (incorrect)

Looks like they also snuck into the 4.0.0 build somehow, then were removed in 4.0.1, but now they're back. These things just won't die! 馃拃

Steps to reproduce

Happy to make a reproduction repo if helpful, but doesn't seem valuable for this particular issue.

Expected result

I would expect only the current files to be in the corresponding published package.

Actual result

Additional files (not in the current source tree) are being included in the published package.

error Generating JavaScript bundles failed

  Error: ./node_modules/gatsby-plugin-emotion/wrap-element.js
  Module not found: Error: Can't resolve 'emotion' in '/project/node_modules/gatsby-plugin-emotion'

Environment

  System:
    OS: macOS 10.14.2
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 11.7.0 - /usr/local/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.5.0 - /usr/local/bin/npm
  Languages:
    Python: 2.7.15 - /usr/local/bin/python
  Browsers:
    Chrome: 71.0.3578.98
    Firefox: 61.0.2
    Safari: 12.0.2
  npmPackages:
    gatsby: 2.0.110 => 2.0.110 
    gatsby-plugin-emotion: 4.0.2 => 4.0.2 
    gatsby-plugin-manifest: 2.0.17 => 2.0.17 
    gatsby-plugin-netlify: 2.0.8 => 2.0.8 
    gatsby-plugin-offline: 2.0.22 => 2.0.22 
    gatsby-plugin-react-helmet: 3.0.6 => 3.0.6 
    gatsby-plugin-typescript: 2.0.6 => 2.0.6 
confirmed bug

Most helpful comment

[email protected] was just published, once again - sorry for issues

All 5 comments

Looks like this has happened before as mentioned in #10500 and #10564. 馃檭

Thanks for reporting this @wKovacs64

We're publishing a new patch version with the fix now! Will probably add a clean step soon as recommended by @DSchau in https://github.com/gatsbyjs/gatsby/pull/10564 to prevent this from happening again

That's my bad - I had old files laying around when publishing :/ We need to make sure to wipe old built files before publishing, but for now I'll just republish. Sorry for issues

All good, thanks for addressing.

[email protected] was just published, once again - sorry for issues

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KyleAMathews picture KyleAMathews  路  3Comments

ferMartz picture ferMartz  路  3Comments

ghost picture ghost  路  3Comments

Oppenheimer1 picture Oppenheimer1  路  3Comments

jimfilippou picture jimfilippou  路  3Comments