TryImpossible / flutter_web_optimizer

A optimization tools for flutter web, solved web page loading slow and browser cache problem.
BSD 3-Clause "New" or "Revised" License
92 stars 14 forks source link

RangeError: Invalid value: Not in inclusive range 0..33: -1 #16

Closed hfbi360 closed 9 months ago

hfbi360 commented 1 year ago

如题执行 flutter pub run flutter_web_optimizer optimize --asset-base http://127.0.0.1:8882/ 优化命令出现以下错误,麻烦大佬看一下

Unhandled exception: RangeError: Invalid value: Not in inclusive range 0..33: -1

0 List.insert (dart:core-patch/growable_array.dart:11:7)

1 ListProxy.insert (package:html/src/list_proxy.dart:40:46)

2 NodeList.insert (package:html/dom.dart:764:13)

3 Node.insertBefore (package:html/dom.dart:244:13)

4 OptimizeCommand._injectToHtml.injectFlutterWebOptimizerScript (package:flutter_web_optimizer/src/optimize/optimize_command.dart:716:23)

5 OptimizeCommand._injectToHtml (package:flutter_web_optimizer/src/optimize/optimize_command.dart:747:5)

6 OptimizeCommand.run (package:flutter_web_optimizer/src/optimize/optimize_command.dart:117:5)

#7 CommandRunner.runCommand (package:args/command_runner.dart:212:13) pub finished with exit code 255
hfbi360 commented 1 year ago

flutter 版本3.3.2

TryImpossible commented 1 year ago

@hfbi360 ,请提供example

hfbi360 commented 1 year ago

@hfbi360 ,请提供example

下载的demo可以生成优化文件,集成到公司项目出现的这个问题。暂时无法提供example