Gatsby: [gatsby-plugin-flow] Latest version was published in ES module format

Created on 11 Mar 2019  路  2Comments  路  Source: gatsbyjs/gatsby

Description

The "minor refactor" rewriting gastby-node.js from CJS to ESM syntax in #12482 was published untranspiled, thus breaking the build for any consuming project.

Steps to reproduce

  1. Go to https://codesandbox.io/s/qx32ny9979?fontsize=14
  2. Restart server or run yarn build
  3. See terminal output

Base Gatsby sandbox with gatsby-plugin-flow added.

Expected result

It should run.

Actual result

error Plugin gatsby-plugin-flow returned an error


  Error: /sandbox/node_modules/gatsby-plugin-flow/gatsby-node.js:1
  (function (exports, require, module, __filename, __dirname) { export const onC  reateBabelConfig = ({
                                                                ^^^^^^
  SyntaxError: Unexpected token export

Environment

$ /sandbox/node_modules/.bin/gatsby info

  System:
    OS: Linux 4.17 Debian GNU/Linux 9 (stretch) 9 (stretch)
    CPU: (8) x64 Intel Xeon Processor (Skylake, IBRS)
    Shell: 4.4.12 - /bin/bash
  Binaries:
    Node: 8.14.0 - /tmp/yarn--1552315817668-0.739238521021055/node
    Yarn: 1.12.3 - /tmp/yarn--1552315817668-0.739238521021055/yarn
    npm: 6.4.1 - /usr/local/bin/npm
  Languages:
    Python: 2.7.13 - /usr/bin/python
  npmPackages:
    gatsby: ^2.1.29 => 2.1.29
    gatsby-image: ^2.0.31 => 2.0.31
    gatsby-plugin-flow: 1.0.3 => 1.0.3
    gatsby-plugin-manifest: ^2.0.22 => 2.0.22
    gatsby-plugin-offline: ^2.0.24 => 2.0.24
    gatsby-plugin-react-helmet: ^3.0.8 => 3.0.8
    gatsby-plugin-sharp: ^2.0.26 => 2.0.26
    gatsby-source-filesystem: ^2.0.23 => 2.0.23
    gatsby-transformer-sharp: ^2.1.15 => 2.1.15

Done in 1.57s.
confirmed bug

All 2 comments

v1.0.4 was published with fix ( https://unpkg.com/[email protected]/gatsby-node.js is cjs again)

@simonkberg Sorry about that 馃槩thanks @pieh for the quick fix

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andykais picture andykais  路  3Comments

kalinchernev picture kalinchernev  路  3Comments

brandonmp picture brandonmp  路  3Comments

ghost picture ghost  路  3Comments

timbrandin picture timbrandin  路  3Comments