Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

Getting it running #928

Closed
riekusr opened this issue Dec 25, 2020 · 1 comment
Closed

Getting it running #928

riekusr opened this issue Dec 25, 2020 · 1 comment

Comments

@riekusr
Copy link

riekusr commented Dec 25, 2020

Tried to get up and running with some tips I found around here, what I did:

  • git clone aqueduct
  • pub global activate -s path D:\projects\aqueduct\aqueduct\aqueduct
    couldn't compile because of analyzer, error:
`Resolving dependencies...
Got dependencies!
Precompiling executables...
Failed to precompile runtime:create:
/C:/Users/RR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/isolate_executor-2.0.2+3/lib/src/source_generator.dart:6:8: Error: Error when reading '/C:/Users/RR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.41.1/lib/analyzer.dart': The system cannot find the file specified.

import 'package:analyzer/analyzer.dart';
       ^
/C:/Users/RR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/isolate_executor-2.0.2+3/lib/src/source_generator.dart:52:17: Error: Type 'ClassDeclaration' not found.
  static Future<ClassDeclaration> _getClass(Type type) async {
                ^^^^^^^^^^^^^^^^
/C:/Users/RR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/isolate_executor-2.0.2+3/lib/src/source_generator.dart:54:22: Error: Method not found: 'parseDartFile'.
    final fileUnit = parseDartFile(uri.toFilePath(windows: Platform.isWindows));
                     ^^^^^^^^^^^^^
/C:/Users/RR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/isolate_executor-2.0.2+3/lib/src/source_generator.dart:58:28: Error: 'ClassDeclaration' isn't a type.
        .where((u) => u is ClassDeclaration)
                           ^^^^^^^^^^^^^^^^
/C:/Users/RR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/isolate_executor-2.0.2+3/lib/src/source_generator.dart:59:28: Error: 'ClassDeclaration' isn't a type.
        .map((cu) => cu as ClassDeclaration)
                           ^^^^^^^^^^^^^^^^
Failed to precompile runtime:create:
/C:/Users/RR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/isolate_executor-2.0.2+3/lib/src/source_generator.dart:6:8: Error: Error when reading '/C:/Users/RR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.41.1/lib/analyzer.dart': The system cannot find the file specified.

import 'package:analyzer/analyzer.dart';
       ^
/C:/Users/RR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/isolate_executor-2.0.2+3/lib/src/source_generator.dart:52:17: Error: Type 'ClassDeclaration' not found.
  static Future<ClassDeclaration> _getClass(Type type) async {
                ^^^^^^^^^^^^^^^^
/C:/Users/RR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/isolate_executor-2.0.2+3/lib/src/source_generator.dart:54:22: Error: Method not found: 'parseDartFile'.
    final fileUnit = parseDartFile(uri.toFilePath(windows: Platform.isWindows));
                     ^^^^^^^^^^^^^
/C:/Users/RR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/isolate_executor-2.0.2+3/lib/src/source_generator.dart:58:28: Error: 'ClassDeclaration' isn't a type.
        .where((u) => u is ClassDeclaration)
                           ^^^^^^^^^^^^^^^^
/C:/Users/RR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/isolate_executor-2.0.2+3/lib/src/source_generator.dart:59:28: Error: 'ClassDeclaration' isn't a type.
        .map((cu) => cu as ClassDeclaration)
                           ^^^^^^^^^^^^^^^^
Precompiled test:test.
Precompiled test:test.
Package aqueduct is currently active at path "D:\projects\aqueduct\aqueduct\aqueduct".
Installed executable aqueduct.
Activated aqueduct 4.0.0-b1 at path "D:\projects\aqueduct\aqueduct\aqueduct".`

tried to downgrade the analyzer package int he pubspec of aqueduct, after that It did compile

then i tried:

  • aqueduct create test
    result:
`D:\projects\aqueduct\coursemedium\server>aqueduct create dart_server
-- Aqueduct CLI Version: 4.0.0-b1
*** Uncaught error
    Bad state: No element
  **** Stacktrace
  * #0      ListMixin.firstWhere (dart:collection/list.dart:148:5)
  * #1      CLIAqueductGlobal.aqueductPackageRef (package:aqueduct/src/cli/commands/create.dart:342:10)
  * #2      CLIAqueductGlobal.templateDirectory (package:aqueduct/src/cli/commands/create.dart:347:12)
  * #3      CLIAqueductGlobal.getTemplateLocation (package:aqueduct/src/cli/commands/create.dart:351:12)
  * #4      CLITemplateCreator.handle (package:aqueduct/src/cli/commands/create.dart:51:27)
  * #5      CLICommand.process (package:aqueduct/src/cli/command.dart:159:20)
  * <asynchronous suspension>
  * #6      CLICommand.process (package:aqueduct/src/cli/command.dart:135:12)
  * #7      main (file:///D:/projects/aqueduct/aqueduct/aqueduct/bin/aqueduct.dart:9:27)
  * #8      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
  * #9      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
  ****

D:\projects\aqueduct\coursemedium\server>aqueduct -h
-- Aqueduct CLI Version: 4.0.0-b1`

I am at a loss, any pointers?

@riekusr
Copy link
Author

riekusr commented Dec 25, 2020

solution was adding this enviroment variable:

PUB_CACHE=%LOCALAPPDATA%\Pub\Cache

@riekusr riekusr closed this as completed Dec 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant