Well I have an false positive error with Babel.
This is the error in the console.
ERROR in ./src/app/playlist/playlist.js
/Users/macbook-lucas/refreex/src/app/playlist/playlist.js
6:23 error A constructor name should not start with a lowercase letter babel/new-cap
✖ 1 problem (1 error, 0 warnings)
@ ./src/app/playlist/index.js 12:16-37
@ ./src/index.js
And here is the code:
import {webtorrent} from 'webtorrent';
class PlaylistController {
contructor() {
this.TorrentId = 'magnet:?xt=urn:btih:6a9759bffd5c0af65319979fb7832189f4f3c35d&dn=sintel.mp4&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel-1024-surround.mp4';
this.Client = new webtorrent();
}
}
export const playlist = {
templateUrl: "app/playlist/playlist.html",
controller: PlaylistController,
bindings: {
playlist: '<'
}
};
Like rici says:
I don't know anything about Babel, but my instinct says that the expression new foo() is supposed to construct an object of class foo. So if class names must start with capital letters, that would have to be new Foo(). Or new Webtorrent(), in your case (see line 6, as per the error message). –
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With