vector_graphics icon indicating copy to clipboard operation
vector_graphics copied to clipboard

isn't run for flutter web

Open JgomesAT opened this issue 1 year ago • 3 comments
trafficstars

When I try to run my code with vector graphics compiler in Flutter Web, the command always finishes with Exit and don't run the code

JgomesAT avatar May 24 '24 06:05 JgomesAT

I can confirm. In my case the assets section of pubspec.yaml has vector_graphics_compiler appied to folders rather than separte files. On MacOS web build just crashes with

Compiling lib/main.dart for the Web...                          
Target web_release_bundle failed: ProcessException: Too many open files
  Command: /Users/admin/flutter-3.22.1/bin/cache/dart-sdk/bin/dart run vector_graphics_compiler --input=/var/folders/6h/rfdkq1md3v79423cgp0_kpbh0000gn/T/flutter_tools.tfmC7z/ic_calendar.svg-transformOutput0.svg --output=/var/folders/6h/rfdkq1md3v79423cgp0_kpbh0000gn/T/flutter_tools.tfmC7z/ic_calendar.svg-transformOutput1.svg
#0      _ProcessImpl._start (dart:io-patch/process_patch.dart:402:33)
#1      Process.start (dart:io-patch/process_patch.dart:38:20)
#2      _runNonInteractiveProcess (dart:io-patch/process_patch.dart:579:18)
#3      Process.run (dart:io-patch/process_patch.dart:49:12)
#4      LocalProcessManager.run (package:process/src/interface/local_process_manager.dart:72:22)
#5      ErrorHandlingProcessManager.run.<anonymous closure> (package:flutter_tools/src/base/error_handling_io.dart:661:24)
#6      _run (package:flutter_tools/src/base/error_handling_io.dart:556:20)
#7      ErrorHandlingProcessManager.run (package:flutter_tools/src/base/error_handling_io.dart:660:12)
#8      AssetTransformer._applyTransformer (package:flutter_tools/src/build_system/tools/asset_transformer.dart:115:56)
#9      AssetTransformer.transformAsset (package:flutter_tools/src/build_system/tools/asset_transformer.dart:64:70)
<asynchronous suspension>

on Windows the picture is better and some of SVG files are transformed but finally build also fails with a file error

alod2019 avatar May 25 '24 07:05 alod2019

I had this issue too but just needed to update my flutter version to 3.22.1! Maybe try this?

willhlas avatar May 28 '24 19:05 willhlas

my crashlog above shows that it happens with flutter 3.22.1

alod2019 avatar May 29 '24 09:05 alod2019