2

So.. there's something weird happening to me.

My code in Dartium was working perfectly until I compiled it o JS. Now only the JS version of it works.. If I compile to JS then I run the program it works. But the Dart Code by itself no long works anymore :(

Does anyone had encountered a similar problem? IS it normal?

If necessary I can paste the entire program here.. but the problem is that Dart is not throwing me any errors and my compiled code works, so I don't know where to look at :(

Thanks!

Marcus Gabilheri
  • 1,259
  • 1
  • 14
  • 26
  • Did you use `pub build` to build to JavaScript (or from within DartEditor, or dart2js)? – Günter Zöchbauer Feb 25 '14 at 05:15
  • I right clicked and selected "Run as JavaScript" then dart2js compiled and after that it just got weird :(. Now if I run the app normally doesn't work but if I run as JS it works fine. And when I run with Dart the app just doesn't do anything... and no error is throwed. – Marcus Gabilheri Feb 25 '14 at 13:58
  • Take a look at your 'web' directory and delete all files not created by you (*.dart.js, ...). I think currently the best way to build to JS is on command line using `pub build` in your package directory (or `pub build --mode=debug` without minification). Run as JavaScript from DartEditor is Work in Progress because there are bigger changes on the way. – Günter Zöchbauer Feb 25 '14 at 14:01
  • Tried it.. still not working. if you want to take a look to the project here is a zipped file of it http://162.243.225.173/moviechooser/MovieChooser%202.zip – Marcus Gabilheri Feb 25 '14 at 19:18
  • My browser had a problem, it wasn't your link. I'll take a look tomorrow. – Günter Zöchbauer Feb 25 '14 at 21:15
  • Just tried it and works fine so far. `dart --version` Dart VM version: 1.2.0-dev.5.15 (Mon Feb 24 02:23:39 2014) on "linux_x64" – Günter Zöchbauer Feb 26 '14 at 10:31
  • Thanks!! I updated and now is working good. I don't know why it happened anyways because one day was working good and the next day it wasn't anymore :( – Marcus Gabilheri Feb 26 '14 at 18:30
  • I read two other similar reports and I find it weird too, but what counts is that you got it working. – Günter Zöchbauer Feb 26 '14 at 21:20

1 Answers1

0

There were some (maybe) similar problems mentioned lately which were solved by updating to a new Dart version. If it's not that it's even weirder.

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567