I am trying to use Webstorm for my Dart project since it is recommended. I have installed it and point it to the Dart sdk and dartium path. On creating a new Dart project, I only see Dart Web App and Dart Command Line App. No polymer template or any other template. What can I do to see those template.
RELEVANT VERSIONS OF DART OFFERINGS:
Dart 1.11.0 (ref 65704b3) DEV (SDK)
Dart 1.11.0 (ref 65704b3) (STABLE) DARTIUM
EDIT 1 (relates to first comment by Gunter)
I deleted and attempted to reinstall stagehand but I am getting the following errors
C:\Users\dart.user\AppData\Roaming\Pub\Cache\global_packages>pub global ac
tivate stagehand
Resolving dependencies...
+ args 0.13.2
+ collection 1.1.1
+ crypto 0.9.0
+ http 0.11.2
+ http_parser 0.0.2+7
+ path 1.3.5
+ source_span 1.1.2
+ stack_trace 1.3.3
+ stagehand 0.2.1
+ string_scanner 0.1.3+1
+ usage 1.0.0+1
Precompiling executables...
Loading source assets...
Failed to precompile stagehand:stagehand:
Unhandled exception:
Uncaught Error: Failure getting http://localhost:49681/packages/crypto/crypto.da
rt: 404 Not Found
Stack Trace:
#0 _asyncLoadError (dart:_builtin:285)
#1 _httpGet.<anonymous closure>.<anonymous closure> (dart:_builtin:228)
#2 _RootZone.runGuarded (dart:async/zone.dart:1082)
#3 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.
dart:390)
#4 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
#5 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:290)
#6 _ForwardingStream._handleDone (dart:async/stream_pipe.dart:112)
#7 _handleDone (dart:async/stream_pipe.dart:180)
#8 _RootZone.runGuarded (dart:async/zone.dart:1082)
#9 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.
dart:390)
#10 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
#11 _DelayedDone.perform (dart:async/stream_impl.dart:614)
#12 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:711)
#13 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart
:671)
#14 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#15 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#16 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dar
t:131)
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:886)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dar
t:131)
Several attempts simply result in the same error.
I did a pub cache repair but the result is the same.
Stagehand provides the following templates; polymer isn't one of them.
$ stagehand
Stagehand will generate the given application type into the current directory.
usage: stagehand <generator-name>
--[no-]analytics Opt out of anonymous usage and crash reporting.
-h, --help Help!
--version Display the version for stagehand.
--author The author name to use for file headers.
(defaults to "<your name>")
Available generators:
console-full - A command-line application sample.
package-simple - A starting point for Dart libraries or applications.
server-shelf - A web server built using the shelf package.
web-angular - A web app with material design components.
web-simple - A web app that uses only core Dart libraries.
web-stagexl - A starting point for 2D animation and games.
Related
Recently, my code has unexpectedly stopped compiling when I try to debug. I'm running Flutter v0.5.1
The only reason I can think of to explain this is as this happened after I moved my flutter SDK from my desktop to a seperate folder.
This is the error I receive:
Error reading dependency file C:\Users\Jake\Desktop\Other\Flutter\myproject\build\app\intermediates\flutter\debug\snapshot_blob.bin.d: java.lang.ArrayIndexOutOfBoundsException: 1
Error reading dependency file C:\Users\Jake\Desktop\Other\Flutter\myproject\build\app\intermediates\flutter\debug\snapshot_blob.bin.d: java.lang.ArrayIndexOutOfBoundsException: 1
Error reading dependency file C:\Users\Jake\Desktop\Other\Flutter\myproject\build\app\intermediates\flutter\debug\snapshot_blob.bin.d: java.lang.ArrayIndexOutOfBoundsException: 1
Oops; flutter has exited unexpectedly.
Crash report written to C:\Users\Jake\Desktop\Other\Flutter\myproject\flutter_14.log;
please let us know at https://github.com/flutter/flutter/issues.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\Jake\Desktop\flutter_windows_v0.5.1-beta\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 435
* What went wrong:
Execution failed for task ':app:flutterBuildDebug'.
> Process 'command 'C:\Users\Jake\Desktop\flutter_windows_v0.5.1-beta\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 12s
Gradle build failed: 1
Exited (sigterm)
This is the Flutter Log thats dumped in the myproject folder:
Flutter crash report; please file at https://github.com/flutter/flutter/issues.
## command
flutter build bundle --suppress-analytics --target C:\Users\Jake\Desktop\Other\Flutter\myproject\lib\main.dart --preview-dart-2 --filesystem-scheme org-dartlang-root --depfile C:\Users\Jake\Desktop\Other\Flutter\myproject\build\app\intermediates\flutter\debug/snapshot_blob.bin.d --asset-dir C:\Users\Jake\Desktop\Other\Flutter\myproject\build\app\intermediates\flutter\debug/flutter_assets
## exception
RangeError: RangeError (index): Invalid value: Only valid value is 0: 1
```
#0 List.[] (dart:core-patch/dart:core/growable_array.dart:141)
#1 readDepfile (package:flutter_tools/src/base/fingerprint.dart:174)
<asynchronous suspension>
#2 Fingerprinter._getPaths (package:flutter_tools/src/base/fingerprint.dart:88)
<asynchronous suspension>
#3 Fingerprinter.doesFingerprintMatch (package:flutter_tools/src/base/fingerprint.dart:60)
<asynchronous suspension>
#4 KernelCompiler.compile (package:flutter_tools/src/compile.dart:104)
<asynchronous suspension>
#5 build (package:flutter_tools/src/bundle.dart:79)
<asynchronous suspension>
#6 BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:72)
<asynchronous suspension>
#7 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:344)
<asynchronous suspension>
#8 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:279)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#10 _rootRun (dart:async/zone.dart:1126)
#11 _CustomZone.run (dart:async/zone.dart:1023)
#12 runZoned (dart:async/zone.dart:1501)
#13 AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#14 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:270)
#15 CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#16 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:309)
<asynchronous suspension>
#17 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#18 _rootRun (dart:async/zone.dart:1126)
#19 _CustomZone.run (dart:async/zone.dart:1023)
#20 runZoned (dart:async/zone.dart:1501)
#21 AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#22 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:265)
<asynchronous suspension>
#23 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#24 new Future.sync (dart:async/future.dart:222)
#25 CommandRunner.run (package:args/command_runner.dart:109)
#26 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:174)
#27 run.<anonymous closure> (package:flutter_tools/runner.dart:59)
<asynchronous suspension>
#28 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#29 _rootRun (dart:async/zone.dart:1126)
#30 _CustomZone.run (dart:async/zone.dart:1023)
#31 runZoned (dart:async/zone.dart:1501)
#32 AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#33 runInContext (package:flutter_tools/src/context_runner.dart:43)
<asynchronous suspension>
#34 run (package:flutter_tools/runner.dart:50)
#35 main (package:flutter_tools/executable.dart:49)
<asynchronous suspension>
#36 main (file:///E:/b/build/slave/Windows_Flutter_Packaging/build/archive/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#37 _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#38 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)
```
## flutter doctor
```
[✓] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.228], locale en-GB)
• Flutter version 0.5.1 at C:\Users\Jake\Desktop\flutter_windows_v0.5.1-beta\flutter
• Framework revision c7ea3ca377 (3 months ago), 2018-05-29 21:07:33 +0200
• Engine revision 1ed25ca7b7
• Dart version 2.0.0-dev.58.0.flutter-f981f09760
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at C:\Users\Jake\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
• All Android licenses accepted.
[✓] Android Studio (version 3.0)
• Android Studio at C:\Program Files\Android\Android Studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[!] VS Code, 64-bit edition (version 1.25.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected devices (1 available)
• HTC Desire 510 • CC58XY408727 • android-arm • Android 4.4.3 (API 19)
! Doctor found issues in 1 category.
```
The errors; ✗ Flutter plugin not installed; ✗ Dart plugin not installed shouldn't be an issue, they are both installed according to VSCode and apparently this issue, due to case sensitive values not being recognised by flutter doctor, affects everyone on VSCode.
This was fixed after Günter suggested a flutter clean.
Follow below steps issue will be fixed
Change your Flutter channel to Master using below command
flutter channel master
the execute below command
flutter run
the issue will be solved and your dart version will be updated
I had the same issue in ubuntu 20.04
I changed my path to directory with no space now problem solved.
Please do the following steps. That worked for me. Only for Mac users.
Step 1: Remove Podfiles by
In mac
i) rm ios/Podfile
ii) rm ios/Podfile.lock
Step 2: Run flutter clean . It will remove the build folder and cleanup the project.
Step 3: Generate Podfiles by flutter run
Note: Don't use Pod init for Generate Podfile,
Because it doesn't create any dependancies.
Optional Step 4: If the Podfiles already generated then we can update it by pod install and pod update.
Also please make sure you are in ios folder.
i) cd ios
ii) pod install
iii) pod update
Note: Please make sure flutter_svg dependency should be flutter_svg: ^0.18.0 in pubspec.yaml
I'm following the Getting Started with Flutter guide and getting stuck when running the actual flutter command:
flutter init -o my_app
Resolving dependencies...
Error on line 17, column 16 of pubspec.yaml: Invalid version constraint: Could not parse version "^1.4.0". Unknown text at "^1.4.0".
stack_trace: ^1.4.0
^^^^^^
Unhandled exception:
Uncaught Error: FileSystemException: Cannot open file, path = '/Users/craig/Code/flutter/packages/flutter_tools/packages/sky_tools/executable.dart' (OS Error: No such file or directory, errno = 2)
Stack Trace:
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:349)
#1 _RootZone.runUnary (dart:async/zone.dart:1151)
#2 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:496)
#3 _Future._propagateToListeners (dart:async/future_impl.dart:579)
#4 _Future._completeWithValue (dart:async/future_impl.dart:339)
#5 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:401)
#6 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#7 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#8 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
Unhandled exception:
Uncaught Error: FileSystemException: Cannot open file, path = '/Users/craig/Code/flutter/bin/cache/flutter_tools.snapshot' (OS Error: No such file or directory, errno = 2)
Stack Trace:
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:349)
#1 _RootZone.runUnary (dart:async/zone.dart:1151)
#2 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:496)
#3 _Future._propagateToListeners (dart:async/future_impl.dart:579)
#4 _Future._completeWithValue (dart:async/future_impl.dart:339)
#5 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:401)
#6 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#7 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#8 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
Looks like your Dart version is outdated < 1.9.2.
Try dart --version to get the version of your installed Dart SDK.
Current is 1.12.x.
Update 2018-03-20
During the migration phase to Dart 2 you might want to install Dart from the dev channel to get a 2.0.0-alpha.x version.
The newest stable version is 1.24.x
For example
brew install dart --devel
Update 2018-06-21
Now also supported:
brew install dart#2
For others who're facing a similar error, I suggest that you read the docs carefully. I didn't, hence I wasted quite some time looking out for the solution elsewhere, even though it was right in front of my eyes all the time: https://flutter.io/setup-macos/#update-your-path
I'm writing the commands down so that you can copy and paste them easily in your terminal window:
touch $HOME/.bash_profile
open $HOME/.bash_profile
Line 1 creates a text file named .bash_profile. Line 2 opens it.
Then the line given below has to be pasted in the text file:
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
Don't forget to save the file after pasting. flutter doctor should work with every Terminal window now.
Open your terminal and run this
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
then run flutter, it will work.
It's because you the path you set up is temporary. To add the path
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
[PATH_TO_FLUTTER_GIT_DIRECTORY] -> Folder where you downloaded flutter or cloned from git.
Then do
echo $PATH
Watch this video to easy install
https://www.youtube.com/watch?v=Em8igImhBKc
Last night, I accidentally updated my Dart Editor and SDK version from 1.60 to 1.72. Accidentally meaning I didn't want to change my development environment while I was developing, but it happened. After that, I see this when I try to "pub get":
>--- 7:48:46 AM Running pub get on /Users/Clayvessel/Dropbox/PROJECT/DART/DART_Project/OneViewer_Composite-Viewer/OneViewer_6 ... ---
>Resolving dependencies...
>Got dependencies!
>Precompiling executables...
>Loading source assets...
>Failed to precompile intl:extract_to_arb:
>Unhandled exception:
>Uncaught Error: Failure getting http://localhost:51271/packages/intl/extract_messages.dart: 404 Not Found
>Stack Trace:
>#0 _asyncLoadError (dart:_builtin:285)
>#1 _httpGet.<anonymous closure>.<anonymous closure> (dart:_builtin:228)
>#2 _RootZone.runGuarded (dart:async/zone.dart:1078)
>#3 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:390)
>#4 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
>#5 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:290)
>#6 _ForwardingStream._handleDone (dart:async/stream_pipe.dart:110)
>#7 _handleDone (dart:async/stream_pipe.dart:178)
>#8 _RootZone.runGuarded (dart:async/zone.dart:1078)
>#9 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:390)
>#10 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
>#11 _DelayedDone.perform (dart:async/stream_impl.dart:614)
>#12 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:711)
>#13 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:671)
>#14 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
>#15 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
>#16 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
>#17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
>
>#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)
>#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
>#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
>#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
>#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
>Failed to precompile intl:generate_from_arb:
>Unhandled exception:
>Uncaught Error: Failure getting http://localhost:51271/packages/intl/extract_messages.dart: 404 Not Found
>Stack Trace:
>#0 _asyncLoadError (dart:_builtin:285)
>#1 _httpGet.<anonymous closure>.<anonymous closure> (dart:_builtin:228)
>#2 _RootZone.runGuarded (dart:async/zone.dart:1078)
>#3 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:390)
>#4 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
>#5 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:290)
>#6 _ForwardingStream._handleDone (dart:async/stream_pipe.dart:110)
>#7 _handleDone (dart:async/stream_pipe.dart:178)
>#8 _RootZone.runGuarded (dart:async/zone.dart:1078)
>#9 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:390)
>#10 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
>#11 _DelayedDone.perform (dart:async/stream_impl.dart:614)
>#12 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:711)
>#13 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:671)
>#14 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
>#15 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
>#16 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
>#17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
>
>#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)
>#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
>#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
>#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
>#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
Specifically it is complaining about the two things:
import 'package:chart/chart.dart'
import 'package:chrome/chrome_app.dart' as chrome
They were working just fine before I update Dart SDK. In Dart Editor, it complains:
Target of URI does not exist
As a novice in Dart, I have done exhaustive searches and din't have a luck. Deadline is coming and I anxiously looking for a solution to this. I develop on Mac Book. But I have a Windows 7 notebook as well. They are sharing project folders equipped by Dropbox. Yesterday before this error happen, I updated my OS X to Yosemite. While the machine was updating, I tried to pub get and compile dart2js for my project in Windows 7 notebook. It generated some errors. So I deleted my whole Dart folder and downloaded it again now from Mac Book. And I realised now dart has been updated to 1.7.2.
Any help on this would be greatly appreciated!
On the command line, running "pub cache repair" might help. I frequently have to do this when I update.
My polymer-dart project use to run fine until I loaded Dart Editor version 1.0.3_r30939 (DEV)
Dart SDK version 1.0.3.0_r30939. Now I have this console output and failure to see my UI:
Uncaught Error: Class '_LocalLibraryMirror' has no instance getter 'functions'.
NoSuchMethodError : method not found: 'functions'
Receiver: Instance of '_LocalLibraryMirror#0x4863bc9'
Arguments: []
Stack Trace:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#1 _loadLibrary (package:polymer/src/loader.dart:172:21)
#2 _loadLibraries (package:polymer/src/loader.dart:89:19)
#3 _initPolymerOptimized (package:polymer/src/loader.dart:54:17)
#4 _rootRun (dart:async/zone.dart:688)
#5 _ZoneDelegate.run (dart:async/zone.dart:417)
#6 _CustomizedZone.run (dart:async/zone.dart:627)
#7 initPolymer (package:polymer/src/loader.dart:37:33)
#8 main (package:polymer/init.dart:23:22)....
Any help will be appreciated. I am using Windows 8 64 bit.
Thansk
When i run the build.dart of my Web Component, the out folder is not created and i receive this error:
SEVERE web/main.html: exception while reading file, original message:
AsyncError: ''package:html5lib/dom.dart': Error: line 91 pos 51: type 'LinkedHashMap' is not loaded
LinkedHashMap<dynamic, String> attributes = new LinkedHashMap();
malformed type used.'
Stack trace:
#0 Node.Node (package:html5lib/dom.dart:91:51)
#1 Document.Document (package:html5lib/dom.dart:313:16)
#2 TreeBuilder.reset (package:html5lib/src/treebuilder.dart:100:16)
#3 TreeBuilder.TreeBuilder (package:html5lib/src/treebuilder.dart:87:10)
#4 HtmlParser.HtmlParser (package:html5lib/parser.dart:148:38)
#5 parseHtml (package:web_ui/src/compiler.dart:34:16)
#6 Compiler._parseHtmlFile.<anonymous closure>.<anonymous closure> (package:web_ui/src/compiler.dart:165:28)
#7 time (package:web_ui/src/utils.dart:38:24)
#8 Compiler._time (package:web_ui/src/compiler.dart:297:16)
#9 Compiler._parseHtmlFile.<anonymous closure> (package:web_ui/src/compiler.dart:164:32)
#10 _ThenFuture._sendValue (dart:async:372:24)
Has anyone the same problem?
Update: thanks for answers. However, i run pub update and now if i run build.dart file the result is:
Uncaught Error: NoSuchMethodError : method not found: 'innerHTML'
Receiver: Instance of 'Element'
Arguments: []
Stack Trace:
#0 Object.noSuchMethod (dart:core-patch:1743:25)
#1 _ElementLoader.visitScriptElement (package:web_ui/src/analyzer.dart:879:16)
#2 _ElementLoader.visitElement (package:web_ui/src/analyzer.dart:770:40)
#3 TreeVisitor.visit (package:html5lib/dom_parsing.dart:208:50)
#4 TreeVisitor.visitChildren (package:html5lib/dom_parsing.dart:220:49)
#5 TreeVisitor.visitNodeFallback (package:html5lib/dom_parsing.dart:228:48)
#6 TreeVisitor.visitElement (package:html5lib/dom_parsing.dart:237:50)
#7 _ElementLoader.visitElement (package:web_ui/src/analyzer.dart:777:34)
#8 TreeVisitor.visit (package:html5lib/dom_parsing.dart:208:50)
#9 TreeVisitor.visitChildren (package:html5lib/dom_parsing.dart:220:49)
#10 TreeVisitor.visitNodeFallback (package:html5lib/dom_parsing.dart:228:48)
#11 TreeVisitor.visitElement (package:html5lib/dom_parsing.dart:237:50)
#12 _ElementLoader.visitElement (package:web_ui/src/analyzer.dart:777:34)
#13 TreeVisitor.visit (package:html5lib/dom_parsing.dart:208:50)
#14 TreeVisitor.visitChildren (package:html5lib/dom_parsing.dart:220:49)
#15 TreeVisitor.visitNodeFallback (package:html5lib/dom_parsing.dart:228:48)
#16 TreeVisitor.visitDocument (package:html5lib/dom_parsing.dart:230:52)
#17 TreeVisitor.visit (package:html5lib/dom_parsing.dart:212:52)
#18 analyzeDefinitions (package:web_ui/src/analyzer.dart:33:15)
#19 Compiler._parseAndDiscover.processHtmlFile.<anonymous closure> (package:web_ui/src/compiler.dart:123:35)
#20 time (package:web_ui/src/utils.dart:38:24)
#21 Compiler._time (package:web_ui/src/compiler.dart:291:16)
#22 Compiler._parseAndDiscover.processHtmlFile (package:web_ui/src /compiler.dart:122:27)
#23 _ThenFuture._sendValue (dart:async:372:24)
I just went through this. It's because the packages you have, haven't been updated. Make sure you are using latest versions of every package, and run pub update.
In my case, I was using an older version of web-ui, which used an older version of html5lib package. I updated web-ui and things worked.
And like Florian said in the other answer, it's caused by a class which has moved to another library.
I recently moved 'LinkedHashMap' from dart:core into dart:collection.
The code you are showing still expects it in core.
Try to find an updated version of the html5lib package (maybe the mailing-list knows where you can download one).
Bob is currently working on versioning the dart-sdk in pub. So hopefully this shouldn't be such a problem in the future.