Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

react-apollo@2.0.3 build broken #1390

Closed
modosc opened this issue Dec 8, 2017 · 7 comments
Closed

react-apollo@2.0.3 build broken #1390

modosc opened this issue Dec 8, 2017 · 7 comments

Comments

@modosc
Copy link

modosc commented Dec 8, 2017

i think the 2.0.3 build isn't transpiling lodash-es correctly.
Intended outcome:

> laptop ~/git/instaflux [graphql|✚ 2⚑ 18]$ yarn add react-apollo@2.0.1
success Saved 3 new dependencies.
├─ lodash.flowright@3.5.0
├─ lodash.pick@4.4.0
└─ react-apollo@2.0.1
✨  Done in 7.08s.
laptop ~/git/instaflux [graphql|✚ 2⚑ 18]$ node
> require('react-apollo')
{ getDataFromTree: [Function: getDataFromTree],
  renderToStringWithData: [Function: renderToStringWithData],
  walkTree: [Function: walkTree],
  compose: [Function],
  ApolloProvider:
   { [Function: ApolloProvider]
     propTypes:
      { client: [Function: bound checkType],
        children: [Function: bound checkType] },
     childContextTypes: { client: [Function: bound checkType] } },
  graphql: [Function: graphql],
  withApollo: [Function: withApollo] }

Actual outcome:

laptop ~/git/instaflux [graphql|✚ 2⚑ 18]$ yarn add react-apollo@2.0.3
success Saved 1 new dependency.
└─ react-apollo@2.0.3
laptop ~/git/instaflux [graphql|⚑ 18]$ node
> require('react-apollo')
/Users/jon/git/instaflux/node_modules/lodash-es/pick.js:1
(function (exports, require, module, __filename, __dirname) { import basePick from './_basePick.js';
                                                              ^^^^^^

SyntaxError: Unexpected token import

How to reproduce the issue:
see above
Version

  • apollo-client@2.0.3
  • react-apollo@2.0.3
@erikfrisk
Copy link

I got this too. Had to downgrade to 2.0.1 for now.

@einarlove
Copy link

Got this to. Downgrading to 2.0.1 worked for me to.

@flippidippi
Copy link

Same here. Looks like it's coming from lodash.

KevinGrandon added a commit to KevinGrandon/react-apollo that referenced this issue Dec 9, 2017
@KevinGrandon
Copy link

Should be fixed in: 557e410

@peggyrayzis
Copy link
Member

peggyrayzis commented Dec 9, 2017

Thanks for reporting! 😀 This is fixed in #1393, just released v2.0.4.

@xcv58
Copy link

xcv58 commented Dec 9, 2017

@peggyrayzis The CI failed, could you rerun it please?

@jasonwr
Copy link

jasonwr commented May 7, 2019

@peggyrayzis Still busted for me in v2.5.5 I'm running lodash-es v4.17.11.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants