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

@babel/runtime": "^7.0.0-beta.44 #76

Open
pgiani opened this issue Jun 1, 2018 · 4 comments
Open

@babel/runtime": "^7.0.0-beta.44 #76

pgiani opened this issue Jun 1, 2018 · 4 comments

Comments

@pgiani
Copy link

pgiani commented Jun 1, 2018

Hi

Im just update my meteor app to 1.7 and it apreas that the "@babel/runtime": "^7.0.0-beta.44" is not compatible with jsx-control-statements, this is the error I get
` While processing files with ecmascript (for target os.osx.x86_64):

/Users/pgiani/.meteor/packages/ecmascript/.0.10.9.lh7yb3.pdla++os+web.browser+web.cordova/plugin.compile-ecmascript.os/npm/node_modules/meteor/babel-compiler/node_modules/@babel/types/lib/definitions/utils.js:128:13:
Property arguments[5] of CallExpression expected node to be of a type ["Expression","SpreadElement","JSXNamespacedName"]
but instead got "JSXSpreadChild"
at validate
at Object.compile (packages/babel-compiler.js:51:29)
at packages/babel-compiler.js:184:22
at Function.time (/tools/tool-env/profile.js:305:10)
at profile (packages/babel-compiler.js:232:20)
at BabelCompiler.BCp.processOneFileForTarget (packages/babel-compiler.js:183:20)
at BabelCompiler. (packages/babel-compiler.js:111:26)
at Array.forEach ()
at BabelCompiler.BCp.processFilesForTarget (packages/babel-compiler.js:110:14)
`

my .babelrc
{ "plugins": ["transform-class-properties", "jsx-control-statements"] }

Any ideas on why is the error occurring, thanks

@AlexGilleran
Copy link
Owner

Are you sure this is us? Could you provide the code that it's failing on or a link to the repo?

I'm not aware of jsx-control-statements generating JSXSpreadChild anywhere :/.

@AlexGilleran
Copy link
Owner

Appears related to this babel/babel#7069

But I still don't understand how we'd be creating it :|

@texttechne
Copy link
Collaborator

@AlexGilleran: We use buildChildren, which needs to be fixed, as mentioned here:
babel/babel#7069 (comment)

@pgiani
Copy link
Author

pgiani commented Jun 16, 2018

Sorry took so long to reply, I never got a notification from this tread

Here is the repo
https://github.com/pgiani/meteor_jsx-control-statements

the code inside the IF should not render

class Main extends React.Component {
    render() {
      return (

        <div>
          Before IF
          <br />
          <br />
          <If condition={false}>
            <span>SHOULD NOT SHOW</span>
          </If>
          <br />
          <br />
          After IF
        </div>
      );
    }
  }

But it does show this

Before IF

false ? SHOULD NOT SHOW : null

After IF 

it show no errors on the console, the error only show on my complete app where the IF is doing some more complex actions

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

No branches or pull requests

3 participants