如何解决升级 [英] How do you fix upgrade

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

问题描述

我有3个月的新飞镖,我很幸运没有遇到任何问题,无法解决从网上找到的答案,但这一个已经困扰我。



我下载了此示例应用程序( https://github.com/ vsavkin / angulardart-sample-app )使用Open Existing Folder将其安装到dart-editor(在我的mac迷你)上,然后在pubspec.yaml文件上运行get Pub Get(甚至发布更新)。



我正在使用正在运行的应用程序加载dartium,直到我将SDK从1.4.2升级到1.5.8,并将pubspec.yaml文件从



环境:

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
发生错误loading file: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
发生错误loading file: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
发生错误loading file: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
发生错误loading file:package:angular / cache / js_cache_register.dart包:angular / cache / js_cache_register.dart:1

无法加载资源:服务器响应状态为404(找不到) http:// localhost:63342 / aa-app / web / package / angular / directive / static_keys.dart
发生错误loading file:package:angular / directive / static_keys.dart package:angular / directive / static_keys.dart:1



无法加载资源:服务器响应状态为404(找不到) http:// localhost:63342 / aa-app / web / 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
发生错误loading file: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
发生错误loading file: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
发生错误loading file:package:angular / core_dom / compiler_config.dart包:angular / core_dom / compiler_config.dart:1



无法加载资源:服务器响应状态为404(找不到) http:// localhost:63342 / aa-app / web / packages / di / check_bind_args.dart
发生错误loading file: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
发生错误loading file:package:di / src / reflector_dynamic.dart package:di / src / reflector_dynamic.dart:1



$ b尝试了不同版本的角度包即版本11.0,12.0,13.0
尝试不同版本的SDK从1.4.2到1.5.3到1.5.8仍然是相同的输出

$ b $

解决方案

错误是什么?



您需要向pubspec.yaml(其中包括di变压器)添加anfular变压器,因为Module.DEFAULT_REFLECTOR未初始化 )


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天全站免登陆