-
-
Notifications
You must be signed in to change notification settings - Fork 629
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
TypeError: Class constructor Component cannot be invoked without 'new' #37
Comments
This is happening, because Babel's Solution would be to use presets that target more modern Node.js versions, for example - https://www.npmjs.com/package/babel-preset-es2015-node5. |
It works now! Thank you so much!! |
You're welcome :) |
if anyone stumbles upon this using the env preset like I was, you can set a more specific target to prevent babel from transpiling ES6 classes .babelrc: {
"presets": [["env", { "targets": { "node": "current" } }]],
"plugins": [
[
"transform-react-jsx",
{
"pragma": "h"
}
]
]
} |
HI @vadimdemedes , Help needed here also: |
@KumaresanDevi how is it related? |
Hi guys!
So I am getting this error, been busting my head over it all day, any thought?
Help, much appreciated 😄.
src/index.js
demo.js
.babelrc
package.json
The text was updated successfully, but these errors were encountered: