refi64 / vuedart

Create Vue web apps in Dart
https://refi64.com/vuedart
310 stars 19 forks source link

Compilation error - Dart 2.2 #36

Closed allochi closed 5 years ago

allochi commented 5 years ago

Hi,

MacOS 10.14.3
Dart 2.2

Using a project built with the CLI as instructed by the documentation website, I get this error twice when I run webdev serve

NoSuchMethodError: Class 'RestrictedAnalysisContext' has no instance method 'resolveCompilationUnit' with matching arguments.
Receiver: Instance of 'RestrictedAnalysisContext'
Tried calling: resolveCompilationUnit(Instance of 'FileSource', Instance of 'LibraryElementImpl')
Found: resolveCompilationUnit(Source, LibraryElement) => CompilationUnit

Is this because of Dart 2.2?

Also, I'm so excited about this project, well done!

refi64 commented 5 years ago

Welp, looks like another analyzer breaking change: https://github.com/dart-lang/build/issues/2071

refi64 commented 5 years ago

@allochi If you could try the latest commit to the v0.4 branch and/or master to make sure it works for you as well, I'll push an update to Pub. Thanks for the report!

allochi commented 5 years ago

@kirbyfan64 I tried the latest master, I still get the same error, I completely removed vuedart from ~/.pub-cache/ and reinstalled it again, no luck.

I don't know how setup the project to use v0.4 branch, could you give me a hint? Thanks!

allochi commented 5 years ago

@kirbyfan64 slash that, I got it to work, I needed to remove the ^ from the package version in pubspec.yaml to force the package manager to use version 0.4.0

dependencies:
  vue: 0.4.0

Now it works! thanks!

refi64 commented 5 years ago

@allochi Hmm that doesn't seem right at all, how are you using vuedart?

YangyuhaoBit commented 5 years ago

@allochi If you could try the latest commit to the v0.4 branch and/or master to make sure it works for you as well, I'll push an update to Pub. Thanks for the report!

I've met the same problem and branch master works for me. Hope this can help

refi64 commented 5 years ago

0.4.2 has been released with a fix.