lvivski / start

Sinatra inspired web development framework for Dart

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The "type 'View' is not loaded" error.

hinikato opened this issue · comments

Hi, I am starting to work with Dart.

I try to run the sample from README and get the following message:

i:\project\test>dart server.dart
Unhandled exception:
'file:///i:/project/test/server.dart': Error: line 5 pos 19: type 'View' is not loaded
  start(view: new View(), public: 'example/public', port: 3000).then((app) {
                  ^
malformed type used.
#0      main (file:///i:/project/test/server.dart:5:19)

I have found the instruction about compilation of the views:

Don't forget to compile views with bin/compiler.dart (views are precompiled in example).

But it is not clear how to do that. Can you describe the full process of compilation and installation? What should be done to fix this error.

The pub install start also does not work in windows, it shows the following message:

Could not find a file named "pubspec.yaml" in the directory ....

So I have created the following pubspec.yaml file to make it work:

name: my_app
dependencies:
    start: any 

and then I run the following command:

pub install

I've added the disclaimer