Closed pygy closed 9 years ago
Fixed, vdom/liquid now using stable versions from pub repository instead of github.
Now pub
works, but I can't get the local version to run.
I get the following in the Chrome console:
Note that I run pub serve --mode=release --port=8888
, with a specific port since I don't know what pub
uses by default.
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8888/js/main.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8888/index.dart
Uncaught Uncaught Error: NullError: Cannot call "V7" on null
Stack Trace:
TypeError: Cannot read property 'V7' of undefined
at cy.St (http://localhost:8888/index.dart.js:6416:28)
at VW.$1 (http://localhost:8888/index.dart.js:5796:3)
at R8.FI (http://localhost:8888/index.dart.js:3352:42)
at rq.$0 (http://localhost:8888/index.dart.js:2823:17)
at dart.vs.static.HZ (http://localhost:8888/index.dart.js:2765:59)
at vs.HH (http://localhost:8888/index.dart.js:2686:3)
at mJ.oo (http://localhost:8888/index.dart.js:2647:3)
at mJ.oo [as tZ] (http://localhost:8888/index.dart.js:2647:34)
at eval [as $0] (eval at <anonymous> (http://localhost:8888/index.dart.js:1212:8), <anonymous>:2:34)
at Av.$0 (http://localhost:8888/index.dart.js:971:8) index.dart.js:1057
It seems that it can't find javascript files
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8888/js/main.js
NODE_ENV=production gulp
should fix this
And all 404 on .dart files can be ignored in --mode=release
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8888/index.dart
I reran gulp to be sure, but it still doesn't work. web/js/main.js
exists.
Here's the server log after trying to load the page twice:
$ pub serve --mode=release --port=8888 ⏎
Loading source assets...
Loading smoke/src/default_transformer transformers... (1.1s)
Serving vdom_benchmark web on http://localhost:8888
Build completed successfully
[web] GET / → vdom_benchmark|web/index.html
[web] GET /js/main.js → Could not find asset vdom_benchmark|web/js/main.js.
[web] GET /packages/browser/dart.js → browser|lib/dart.js
[Info from Dart2JS]:
Compiling vdom_benchmark|web/index.dart...
[Warning from Dart2JS on vdom_benchmark|web/index.dart]:
1 hint(s) suppressed in package:charted.
[Info from Dart2JS]:
Took 0:00:11.065244 to compile vdom_benchmark|web/index.dart.
Build completed successfully
[web] GET /index.dart.js → vdom_benchmark|web/index.dart.js
[web] GET / → vdom_benchmark|web/index.html
[web] GET /js/main.js → Could not find asset vdom_benchmark|web/js/main.js.
[web] GET /packages/browser/dart.js → browser|lib/dart.js
[web] GET /index.dart.js → vdom_benchmark|web/index.dart.js
I can't reproduce it (Dart 1.8.0 stable)
$ git clone https://github.com/localvoid/vdom-benchmark.git
...
$ cd vdom-benchmark
$ npm install
...
$ NODE_ENV=production gulp
...
$ pub serve --mode=release --port=8888
Your pubspec has changed, so we need to update your lockfile:
Resolving dependencies... (5.3s)
+ analyzer 0.22.4 (0.23.0-dev.13 available)
+ args 0.12.1
+ barback 0.15.2+2
+ browser 0.10.0+2
+ charted 0.0.7
+ code_transformers 0.2.3+1
+ collection 1.1.0
+ csslib 0.11.0+2
+ dom_scheduler 0.0.1
+ intl 0.11.11
+ liquid 0.2.1
+ logging 0.9.2
+ observe 0.12.2
+ path 1.3.0
+ petitparser 1.3.1
+ pool 1.0.1
+ smoke 0.2.1+1
+ source_maps 0.10.0+1
+ source_span 1.0.2
+ stack_trace 1.1.1
+ utf 0.9.0+1
+ vdom 0.7.1
+ watcher 0.9.3
Downloading liquid 0.2.1...
Changed 23 dependencies!
Precompiling dependencies...
Loading source assets...
Loading smoke/src/default_transformer transformers...
Precompiled smoke.
Loading source assets...
Loading smoke/src/default_transformer transformers...
Serving vdom_benchmark web on http://localhost:8888
Build completed successfully
[web] GET / → vdom_benchmark|web/index.html
[web] GET /js/main.js → vdom_benchmark|web/js/main.js
[web] GET /packages/browser/dart.js → browser|lib/dart.js
[Info from Dart2JS]:
Compiling vdom_benchmark|web/index.dart...
[Warning from Dart2JS on vdom_benchmark|web/index.dart]:
1 hint(s) suppressed in package:charted.
[Info from Dart2JS]:
Took 0:00:07.898853 to compile vdom_benchmark|web/index.dart.
Build completed successfully
[web] GET /index.dart.js → vdom_benchmark|web/index.dart.js
It should work if vdom-benchmark/web/js/main.js
file exists.
My bad I had a stray Dart v1.6 in the path (installed while trying to get rid of the original problem).
It works here too.
I get a dart2js crash on OS X (with both Dart v1.6 and 1.8):
I reported the issue upstream, but I wanted to let you know.