Breaking on exception: NotFoundError: An attempt was made to reference a Node in a context where it does not exist.
payments.forEach((payment) {var row = _scheduleTable.addRow();row.addCell().innerHtml = dateFormat(payment.date);row.addCell()..innerHtml = moneyFormat(payment.periodPrincipalPaid, true)..classes.add('money');
--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
--
Hi Dan,So I tried to repro the bug myself (to better understand) but I'm unable to build your project (https://github.com/patefacio/finance/tree/master/mortgage_calculator) Something about pub build not finding dependencies elements?The error:Build error:Transform polymer (ImportInliner) on mortgage_calculator|web/examples/mortgage_calculator/mortgage_calculator.html threw error: Transform polymer (ImportInliner) on mortgage_calculator|web/examples/mortgage_calculator/mortgage_calculator.html tried to load missing input mortgage_calculator|basic_input/components/money_input.html.nullBuild failed.I see lines like this inside of the lib/ dir:<link rel="import" href="../../basic_input/components/money_input.html">
I have a basic mortgage calculator component (Mortgage Calculator Example) that works as I want when "Run in Dartium" directly on the html file. However, after running 'pub build', when I run the corresponding file in Dartium I get the following error.
Breaking on exception: NotFoundError: An attempt was made to reference a Node in a context where it does not exist.
The relevant code from the call-stack with the apparent offending line highlighted in red is:payments.forEach((payment) {var row = _scheduleTable.addRow();row.addCell().innerHtml = dateFormat(payment.date);row.addCell()..innerHtml = moneyFormat(payment.periodPrincipalPaid, true)..classes.add('money');A search on the text of the error leads to Node in a context where it does not exist. Since that question deals with a list of images, so it is not clear how it might be related.Any suggestions welcome.ThanksDan
--
On Sat, Dec 21, 2013 at 1:56 PM, phyton.dbd <phyto...@gmail.com> wrote:
I have a basic mortgage calculator component (Mortgage Calculator Example) that works as I want when "Run in Dartium" directly on the html file. However, after running 'pub build', when I run the corresponding file in Dartium I get the following error.Another thing to note - when you run 'pub build', the build/ folder only contains the JS code by default. So it's possible that you are not running the code natively in Dart. Try running 'pub build --mode=debug'. That will preserve the Dart code in the build/ folder, and you'll be able to tell apart if the error comes from the polymer-transformer or if it's something else.
bash-3.2$ pub build --mode=debugBuilding mortgage_calculator.......[Dart2JS on mortgage_calculator|web/examples/mortgage_calculator/mortgage_calculator.html_bootstrap.dart]:packages/collection/src/unmodifiable_wrappers.dart:210:50: Warning: 'Map<K, V>' is not assignable to 'Map<K, V>'.UnmodifiableMapView(Map<K, V> baseMap) : super(baseMap);^^^^^^^[Dart2JS on mortgage_calculator|web/examples/mortgage_calculator/mortgage_calculator.html_bootstrap.dart]:packages/collection/src/unmodifiable_wrappers.dart:209:38: Info: This is the method declaration.with UnmodifiableMapMixin<K, V> {^^^^^^^^^^^^^^^^^^^^[Warning in Dart2JS]:web/examples/mortgage_calculator/mortgage_calculator.html_bootstrap.dart:1:1: Hint: 320 methods retained for use by dart:mirrors out of 2484 total methods (13%).library app_bootstrap;[Dart2JS on mortgage_calculator|web/examples/mortgage_calculator/mortgage_calculator.html_bootstrap.dart]:
One more follow up: For kicks I started fresh pulling from github. Now running in debug still runs as before. Running the built (via pub build) html file using "Run in Dartium" also runs! I have no idea why starting over should have fixed it.
Hey Dan,I was just looking into this, and I think I found the issue. It seems that "pub build" is only creating a 'packages/' directory at the top level, and not one nested inside any subdirectory of web you might have (in your case 'web/examples/...'). This means that any url we create with 'packages/' on it might not work correctly.Correct me if I'm wrong, but I believe when you do 'Run in Dartium' on the build folder, you should also see the errors messages about not being able to load the polyfills. In Dartium the app probably runs fine because we actually don't use the polyfills.I filed issue 15808 to track this problem. You can temporarily workaround this problem by creating a symlink to build/packages/ in the folder build/examples/mortgage_calculator/ until that bug is fixed.
- finance- basic_input- lib- components- money_input...- pubspec.yaml- mortgage_calculator- lib- components- mortgage_details.html/dart- mortgage_calculator.html/dart- payment_schedule.html/dart
basic_input:
path: ../basic_input
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Breaking on exception: NotFoundError: An attempt was made to reference a Node in a context where it does not exist.
payments.forEach((payment) {var row = _scheduleTable.addRow();row.addCell().innerHtml = dateFormat(payment.date);row.addCell()..innerHtml = moneyFormat(payment.periodPrincipalPaid, true)..classes.add('money');
payments.forEach((payment) {print("ScheduleTable => $_scheduleTable");var row = _scheduleTable.addRow();print("Adding row $row");print("Date is ${dateFormat(payment.date)}");row.addCell().innerHtml = dateFormat(payment.date);print("Added first cell");var cell = row.addCell();
--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/11df4683-e34b-46ad-9918-37efcc585141%40dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/df638da9-8e46-4c62-9d2b-b1d4fe73dcd1%40dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/0fe6bff2-e9db-4a14-853f-0f07783b346f%40dartlang.org.