refi64 / vuedart

Create Vue web apps in Dart
https://refi64.com/vuedart
310 stars 19 forks source link

[BUG] RangeError: Offset may not be negative, was -1. #47

Closed angelhdzdev closed 4 years ago

angelhdzdev commented 4 years ago

Error

RangeError: Offset may not be negative, was -1.

Info

This happens when I create a component. I followed the tutorial. Created a file home_page.dart, and inside:

import 'package:vue/vue.dart';

@VueComponent(template: '<div>Home</div>')
class HomePage extends VueComponentBase {
}

Then in the index.dart:

import 'package:vue/vue.dart';
import 'home_page.dart';

@VueApp(el: '#app', components: [HomePage])
class App extends VueAppBase {
}

App app;

void main() {
  app = App();
  app.create();
}

And in the index.html:

<body>
  <div id="app">
    <home-page></home-page>
  </div>
</body>

image

angelhdzdev commented 4 years ago

Solved

Installed from Github master instead of pub and it works now.