gibahjoe / openapi-generator-dart

Openapi Generator for Dart/Flutter
BSD 3-Clause "New" or "Revised" License
112 stars 29 forks source link

Could not complete source generation #112

Closed affansk closed 9 months ago

affansk commented 10 months ago

Description of the bug

I am using openapi_generator_annotations: ^4.13.0, openapi_generator: ^4.13.0 with dio 5.3.2. once i run the command to generate files. it fails to generate

Steps to reproduce

1) openapi_generator_annotations: ^4.13.0, 2) openapi_generator: ^4.13.0 3) dio 5.3.2 4) @Openapi( additionalProperties: AdditionalProperties( pubName: 'aljsddd_api', pubAuthor: 'sdcasdcas'), inputSpecFile: 'swagger.json', generatorName: Generator.dio, alwaysRun: true, outputDirectory: 'lib/api/alsdd_api')

Please install this packages, then run this command : flutter pub run build_runner build --delete-conflicting-outputs

Expected behavior

Should Generate source Without Error

Logs

Failed to generate source code. Build Command output: Cannot rename file to './.dart_tool/pub/bin/build_runner/build_runner.dart-3.1.0.snapshot', path = './.dart_tool/pub/incremental/build_runner/tmp6BSfGQ/build_runner.dart.incremental.dill.temp' (OS Error: No such file or directory, errno = 2)
 #0      OpenapiGenerator.runSourceGen (package:openapi_generator/src/openapi_generator_runner.dart:396:34)
<asynchronous suspension>
#1      OpenapiGenerator.generateSources.<anonymous closure> (package:openapi_generator/src/openapi_generator_runner.dart:337:9)
<asynchronous suspension>

Screenshots

No response

Platform

macOS

Library version

4.13.0

Flutter version

3.13.1

Flutter channel

stable

Additional context

No response

flachica commented 9 months ago

I have the same error, could you comment on how you managed to solve the problem? Thank you.

flachica commented 9 months ago

I close vscode, launch command from console and solve my problem