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

The transform-runtime plugin doesn't handle classes #2860

Closed
jkroso opened this issue Nov 6, 2015 · 3 comments
Closed

The transform-runtime plugin doesn't handle classes #2860

jkroso opened this issue Nov 6, 2015 · 3 comments
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@jkroso
Copy link

jkroso commented Nov 6, 2015

#! /usr/bin/env node
const babel = require('babel-core')

babel.transform('class A {}', {
  presets: [
    require('babel-preset-es2015')
  ],
  plugins: [
    require('babel-plugin-transform-runtime')
  ]
})

Generates this error:

TypeError: unknown: Property callee of CallExpression expected node to be of a type ["Expression"] but instead got null
    at Object.validate (/Users/jkroso/Projects/js/6-5/node_modules/babel-types/lib/definitions/index.js:97:13)
    at validate (/Users/jkroso/Projects/js/6-5/node_modules/babel-types/lib/index.js:267:9)
    at Object.builder (/Users/jkroso/Projects/js/6-5/node_modules/babel-types/lib/index.js:243:7)
    at PluginPass.exit (/Users/jkroso/Projects/js/6-5/node_modules/babel-plugin-transform-es2015-modules-commonjs/lib/index.js:401:98)
    at newFn (/Users/jkroso/Projects/js/6-5/node_modules/babel-traverse/lib/visitors.js:233:27)
    at NodePath._call (/Users/jkroso/Projects/js/6-5/node_modules/babel-traverse/lib/path/context.js:72:18)
    at NodePath.call (/Users/jkroso/Projects/js/6-5/node_modules/babel-traverse/lib/path/context.js:44:17)
    at NodePath.visit (/Users/jkroso/Projects/js/6-5/node_modules/babel-traverse/lib/path/context.js:108:8)
    at TraversalContext.visitQueue (/Users/jkroso/Projects/js/6-5/node_modules/babel-traverse/lib/context.js:151:16)
    at TraversalContext.visitSingle (/Users/jkroso/Projects/js/6-5/node_modules/babel-traverse/lib/context.js:111:19)
@hzoo
Copy link
Member

hzoo commented Nov 6, 2015

Hmm I cannot reproduce? Maybe check your versions, or try babel-doctor

@jkroso
Copy link
Author

jkroso commented Nov 6, 2015

Oh yea I was running version 6.1.2 of the transform and 6.0.14 of babel-core. After bringing them both up to 6.1.2 it worked. Thanks for looking at it

@hzoo
Copy link
Member

hzoo commented Nov 6, 2015

Ok cool closing then

@hzoo hzoo closed this as completed Nov 6, 2015
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jul 10, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

2 participants