你如何修复升级 [英] How do you fix upgrade

查看:31
本文介绍了你如何修复升级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚接触 dart 3 个月,我很幸运没有遇到任何无法从网上找到的答案中解决的问题,但这个问题让我很难过.

我下载了这个示例应用程序(https://github.com/vsavkin/angulardart-sample-app) 使用 Open Existing Folder 将它安装到 dart-editor(在我的 mac mini 上),然后在 pubspec.yaml 文件上运行 get Pub Get(甚至 Pub Update).

在我将 SDK 从 1.4.2 升级到 1.5.8 并从

升级 pubspec.yaml 文件之前,我一直在使用正在运行的应用程序加载 dartium

环境:
sdk: '>=1.4.2 <2.0.0' 到

环境:
sdk: '>=1.5.8 <2.0.0'

一切都刚刚中断,我现在在 dartium 中遇到这些类型的错误,我想知道如何解决(恢复没有帮助,404 仍然存在 - 是否有一些正在读取的旧缓存,我找不到?):

资源加载失败:服务器响应状态为 404(未找到)http://localhost:63342/aa-app/packages/shadow_dom/shadow_dom.min.js>

加载资源失败:服务器响应状态为 404(未找到)http://localhost:63342/aa-app/web/packages/angular/routing/static_keys.dart加载文件时发生错误:package:angular/routing/static_keys.dart package:angular/routing/static_keys.dart:1

加载资源失败:服务器响应状态为 404(未找到)http://localhost:63342/aa-app/web/packages/angular/cache/module.dart加载文件时发生错误:package:angular/cache/module.dart package:angular/cache/module.dart:1

加载资源失败:服务器响应状态为 404(未找到)http://localhost:63342/aa-app/web/packages/angular/core_dom/directive_injector.dart加载文件时发生错误:package:angular/core_dom/directive_injector.dart package:angular/core_dom/directive_injector.dart:1

加载资源失败:服务器响应状态为 404(未找到)http://localhost:63342/aa-app/web/packages/angular/cache/js_cache_register.dart加载文件时发生错误:package:angular/cache/js_cache_register.dart package:angular/cache/js_cache_register.dart:1

加载资源失败:服务器响应状态为 404(未找到)http://localhost:63342/aa-app/web/packages/angular/directive/static_keys.dart加载文件时出错:package:angular/directive/static_keys.dart package:angular/directive/static_keys.dart:1

加载资源失败:服务器响应状态为 404(未找到)http://localhost:63342/aa-app/web/packages/angular/core/static_keys.dart加载文件时发生错误:package:angular/core/static_keys.dart package:angular/core/static_keys.dart:1

加载资源失败:服务器响应状态为 404(未找到)http://localhost:63342/aa-app/web/packages/di/src/reflector.dart加载文件时发生错误:package:di/src/reflector.dart package:di/src/reflector.dart:1

加载资源失败:服务器响应状态为 404(未找到)http://localhost:63342/aa-app/web/packages/angular/change_detection/ast_parser.dart加载文件时发生错误:package:angular/change_detection/ast_parser.dart package:angular/change_detection/ast_parser.dart:1

加载资源失败:服务器响应状态为 404(未找到)http://localhost:63342/aa-app/web/packages/angular/core_dom/compiler_config.dart加载文件时发生错误:package:angular/core_dom/compiler_config.dart package:angular/core_dom/compiler_config.dart:1

加载资源失败:服务器响应状态为 404(未找到)http://localhost:63342/aa-app/web/packages/di/check_bind_args.dart加载文件时发生错误:package:di/check_bind_args.dart package:di/check_bind_args.dart:1

加载资源失败:服务器响应状态为 404(未找到)http://localhost:63342/aa-app/web/packages/di/src/reflector_dynamic.dart加载文件时发生错误:package:di/src/reflector_dynamic.dart package:di/src/reflector_dynamic.dart:1

尝试从头开始尝试过不同版本的 angular 包,即版本 11.0、12.0、13.0尝试了不同版本的 SDK 从 1.4.2 到 1.5.3 到 1.5.8 还是一样的输出

我到底做了什么来破坏如此流畅的东西?

解决方案

抛出错误Module.DEFAULT_REFLECTOR not initialized",因为没有执行 di 转换器.

您需要将 anfular 转换器添加到您的 pubspec.yaml(包括 di 转换器)

I'm 3 months new into dart and I've been fairly lucky not to have encountered any issues that couldn't be fixed from answers found on the net, but this one has stumped me.

I downloaded this sample app (https://github.com/vsavkin/angulardart-sample-app) installed it into dart-editor (on my mac mini) using Open Existing Folder and then running get Pub Get (or even Pub Update) on the pubspec.yaml file.

I was getting dartium loading with a running app until I upgraded the SDK from 1.4.2 to 1.5.8 and the pubspec.yaml file from

environment:
sdk: '>=1.4.2 <2.0.0' to

environment:
sdk: '>=1.5.8 <2.0.0'

where everything just broke and i am now getting these types of errors in dartium which I'd like to know how to fix (reverting hasn't helped, 404's are still present - is there some old cache that's being read that I can't find?):

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/packages/shadow_dom/shadow_dom.min.js

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/routing/static_keys.dart An error occurred loading file: package:angular/routing/static_keys.dart package:angular/routing/static_keys.dart:1

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/cache/module.dart An error occurred loading file: package:angular/cache/module.dart package:angular/cache/module.dart:1

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/core_dom/directive_injector.dart An error occurred loading file: package:angular/core_dom/directive_injector.dart package:angular/core_dom/directive_injector.dart:1

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/cache/js_cache_register.dart An error occurred loading file: package:angular/cache/js_cache_register.dart package:angular/cache/js_cache_register.dart:1

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/directive/static_keys.dart An error occurred loading file: package:angular/directive/static_keys.dart package:angular/directive/static_keys.dart:1

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/core/static_keys.dart An error occurred loading file: package:angular/core/static_keys.dart package:angular/core/static_keys.dart:1

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/di/src/reflector.dart An error occurred loading file: package:di/src/reflector.dart package:di/src/reflector.dart:1

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/change_detection/ast_parser.dart An error occurred loading file: package:angular/change_detection/ast_parser.dart package:angular/change_detection/ast_parser.dart:1

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/core_dom/compiler_config.dart An error occurred loading file: package:angular/core_dom/compiler_config.dart package:angular/core_dom/compiler_config.dart:1

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/di/check_bind_args.dart An error occurred loading file: package:di/check_bind_args.dart package:di/check_bind_args.dart:1

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/di/src/reflector_dynamic.dart An error occurred loading file: package:di/src/reflector_dynamic.dart package:di/src/reflector_dynamic.dart:1

Have tried starting from scratch Have tried different versions of the angular package ie version 11.0, 12.0, 13.0 Have tried different versions of SDK from 1.4.2 to 1.5.3 to 1.5.8 still the same output

What on earth have i done to ruin something that was working so slickly?

解决方案

The error "Module.DEFAULT_REFLECTOR not initialized" is thrown because the di transformer is not executed.

You need to add the anfular transformer to your pubspec.yaml (which includes the di transformer)

这篇关于你如何修复升级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆