SyntaxError: super() outside of class constructor
See original GitHub issueHi, I getting error from manual on Facebook docs.
Failed to compile.
Error in ./src/App.js
Syntax error: super() outside of class constructor (8:4)
6 |
7 | construtor() {
> 8 | super()
| ^
@ ./src/index.js 13:11-27
npm -v = 4.0.3 node -v = 7.1.0
What’s wrong with this syntax?
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Error: call super outside of class constructor
You call not the parent method, but parent constructor which is not valid call outside of the constructor. You need to use super.cool(val); ......
Read more >super - JavaScript - MDN Web Docs - Mozilla
The super keyword is used to access properties on an object literal or class's [[Prototype]], or invoke a superclass's constructor.
Read more >JavaScript Class constructor Method
This will throw a SyntaxError . You can use the super() method to call the constructor of a parent class (see "More Examples"...
Read more >Classes [ES6] • JavaScript for impatient programmers ...
.constructor() is a special method that is called after the creation of a new instance. ... And they are invisible to the world...
Read more >constructor-super - ESLint - Pluggable JavaScript Linter
Constructors of non derived classes must not call super() . ... "error"*/ /*eslint-env es6*/ class A { constructor() { super(); // This is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Does line 7 have a typo?
construtor
=>constructor
Oh my gosh I spent 20 min with “contructor” instead “constructor”