stablekernel / aqueduct

Dart HTTP server framework for building REST APIs. Includes PostgreSQL ORM and OAuth2 provider.
https://aqueduct.io
BSD 2-Clause "Simplified" License
2.42k stars 280 forks source link

Getting it running #928

Closed riekusr closed 3 years ago

riekusr commented 3 years ago

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

`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:

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



I am at a loss, any pointers?
riekusr commented 3 years ago

solution was adding this enviroment variable:

PUB_CACHE=%LOCALAPPDATA%\Pub\Cache