Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

There is a problem with using Angular_forms package. #1849

Closed
acratophorux opened this issue Aug 5, 2019 · 5 comments
Closed

There is a problem with using Angular_forms package. #1849

acratophorux opened this issue Aug 5, 2019 · 5 comments

Comments

@acratophorux
Copy link

*Using Android Studio

  • [ sdk: '>=2.2.0 <3.0.0'] Dart SDK Version (dart --version)

  • [ angular: ^6.0.0-alpha] AngularDart Version

  • [ Using Linux Ubuntu 18.04 LTS] Whether you are using Windows, macOS, or Linux (if applicable)

  • [chrome ] Whether you are using Chrome, Safari, Firefox, Edge (if applicable)

    The terminal is showing following error. I have upgraded the dependencies already.


The values in a const list literal must be constants.

1 │ formDirectives
│ ^^^^^^^^^^^^^^

line 15, column 16 of package:angular_app/app_component.dart: Undefined name 'formDirectives'.

1 │ formDirectives
│ ^^^^^^^^^^^^^^

[INFO] Running build completed, took 1.9s
[INFO] Caching finalized dependency graph completed, took 532ms
[SEVERE]build_web_compilers:entrypoint on web/main.dart (cached): Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).

Please check the following imports:

import 'package:angular_app/app_component.template.dart' as ng; from angular_app|web/main.dart at 2:1

[SEVERE] Failed after 2.5s

@leonsenft
Copy link
Contributor

It sounds like there may be a problem in your imports or dependencies. Could you share the import statements in app_component.dart and your pubspec.yaml please?

@acratophorux
Copy link
Author

the problem is solved ... though I don't know how.
I just added formDirectives as a custom attribute to HTML.
^^^^^^^^^^^^^^^

@armantorkzaban
Copy link

armantorkzaban commented Aug 10, 2019

Same issue. Have not been able to solve yet.
imports:
import 'package:angular/angular.dart';
import 'package:angular_forms/angular_forms.dart';
import 'hero.dart';

pubsec:
name: angular_app
description: Tour of Heroes
version: 0.0.1

environment:
sdk: '>=2.2.0 <3.0.0'

dependencies:
angular: ^6.0.0-alpha
angular_forms: ^2.1.0
dev_dependencies:
angular_test: ^2.3.1
build_runner: ^1.5.1
build_test: ^0.10.8
build_web_compilers: ^2.1.0
test: ^1.6.4

======

Analyzer Feedback from IntelliJ

Version information

  • IDEA WS-192.5728.87
  • 2.5.0-dev.1.0
  • WS-192.5728.87, JRE 11.0.3+12-b304.10x64 JetBrains s.r.o, OS Linux(amd64) v4.9.0-9-amd64, screens 1920x1080

Exception

Dart analysis server, SDK version 2.5.0-dev.1.0, server version 1.27.1, error: Analysis failed: /home/arman/App/angul/angular_tour_of_heroes/test/app_test.dart context: exception_20190810_021021_792
NoSuchMethodError: The getter 'uri' was called on null.
Receiver: null
Tried calling: uri
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
#1      new _LibraryResynthesizer (package:analyzer/src/summary/resynthesize.dart:666:32)
#2      SummaryResynthesizer.getLibraryElement.<anonymous closure> (package:analyzer/src/summary/resynthesize.dart:384:56)
#3      __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)
#4      SummaryResynthesizer.getLibraryElement (package:analyzer/src/summary/resynthesize.dart:351:36)
#5      SummaryResynthesizer.getElement (package:analyzer/src/summary/resynthesize.dart:243:14)
#6      LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:151:12)
#7      LibraryAnalyzer.analyze.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:112:14)
#8      _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#9      LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:111:43)
#10     AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1451:63)
#11     PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
#12     AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1428:20)
#13     AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1248:33)
<asynchronous suspension>
#14     AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2188:24)
<asynchronous suspension>
#15     AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2118:5)
#16     new AnalysisServer (package:analysis_server/src/analysis_server.dart:208:29)
#17     SocketServer.createAnalysisServer (package:analysis_server/src/socket_server.dart:86:26)
#18     StdioAnalysisServer.serveStdio (package:analysis_server/src/server/stdio_server.dart:37:18)
#19     Driver.startAnalysisServer.<anonymous closure> (package:analysis_server/src/server/driver.dart:542:21)
#20     _rootRun (dart:async/zone.dart:1124:13)
#21     _CustomZone.run (dart:async/zone.dart:1021:19)
#22     _runZoned (dart:async/zone.dart:1516:10)
#23     runZoned (dart:async/zone.dart:1463:12)
#24     Driver._captureExceptions (package:analysis_server/src/server/driver.dart:627:12)
#25     Driver.startAnalysisServer (package:analysis_server/src/server/driver.dart:540:7)
#26     Driver.start.<anonymous closure> (package:analysis_server/src/server/driver.dart:444:9)
#27     _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#28     Driver.start.<anonymous closure> (package:analysis_server/src/server/driver.dart:439:43)
#29     CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:122:46)
#30     new Future.sync (dart:async/future.dart:224:31)
#31     CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:122:19)
#32     _rootRun (dart:async/zone.dart:1124:13)
#33     _CustomZone.run (dart:async/zone.dart:1021:19)
#34     _runZoned (dart:async/zone.dart:1516:10)
#35     runZoned (dart:async/zone.dart:1463:12)
#36     CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:121:12)
#37     CompilerContext.runWithDefaultOptions (package:front_end/src/fasta/compiler_context.dart:140:56)
#38     Driver.start (package:analysis_server/src/server/driver.dart:439:21)
#39     main (file:///tmp/tmpxmd0vU/dart-2.5.0-dev.1.0/dart/pkg/analysis_server/bin/server.dart:12:11)
#40     _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#41     main (file:///tmp/tmpxmd0vU/dart-2.5.0-dev.1.0/dart/pkg/analysis_server/bin/server.dart:10:10)
#42     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
#43     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

For additional log information, please append the contents of
file:///tmp/report.txt.

@Nithsua
Copy link

Nithsua commented Oct 21, 2019

the problem is solved ... though I don't know how.
I just added formDirectives as a custom attribute to HTML.
^^^^^^^^^^^^^^^

How did he solve it?

@vgorloff
Copy link

vgorloff commented Feb 2, 2020

Hi,

After downgrade to angular: ^5.3.1 the error is disappeared.

name: angular_app
description: A web app that uses AngularDart
version: 0.0.1

environment:
  sdk: '>=2.2.0 <3.0.0'

dependencies:
  angular: ^5.3.1
  angular_forms: ^2.1.2

dev_dependencies:
  build_runner: '>=1.6.2 <2.0.0'
  build_web_compilers: '>=1.2.0 <3.0.0'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants