当更新到Angular 5时,我收到错误:严重依赖:依赖的请求是一个表
发布时间:2020-12-17 08:52:40 所属栏目:安全 来源:网络整理
导读:以前我的应用程序正在使用Angular 4.4.6.我跟着 guide https://angular-update-guide.firebaseapp.com/更新为Angular 5.我使用了这个: npm install @angular/animations@'^5.0.0' @angular/common@'^5.0.0' @angular/compiler@'^5.0.0' @angular/compiler-c
以前我的应用程序正在使用Angular 4.4.6.我跟着
guide
https://angular-update-guide.firebaseapp.com/更新为Angular 5.我使用了这个: npm install @angular/animations@'^5.0.0' @angular/common@'^5.0.0' @angular/compiler@'^5.0.0' @angular/compiler-cli@'^5.0.0' @angular/core@'^5.0.0' @angular/forms@'^5.0.0' @angular/http@'^5.0.0' @angular/platform-browser@'^5.0.0' @angular/platform-browser-dynamic@'^5.0.0' @angular/platform-server@'^5.0.0' @angular/router@'^5.0.0' typescript@2.4.2 rxjs@'^5.5.2' 但它没有用.它会给我一个错误,没有找到rxjs的有效目标.所以相反,我只是更改了我的package.json中的版本并运行了npm install并且它工作正常,但是当运行npm start时,我收到了错误 WARNING in ./~/@angular/core/esm5/core.js 6456:15-102 Critical dependency: the request of a dependency is an expression 所以我删除了我的node_modules并再次进行了npm安装,运行npm start时仍然遇到同样的错误. 截图:
我设法通过改变webpack.common.js来解决它:
new webpack.ContextReplacementPlugin( /(.+)?angular(|/)core(.+)?/,root('./src'),{} ) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
- -bash: sz: command not found、-bash: rz: comm
- 如何在Scala“match”语句中匹配课程?
- scala中的类型安全的respond_to可能吗?
- 在Unix/Linux平台上找到os名称和版本的最佳方式
- 从源码看 angular/material2 中 dialog模块 的实
- angularjs – 将Angular UI-Bootstrap限制为特定
- scala – Slick 3.0插入然后获取自动递增值
- LazyManage运维批量Linux系统管理脚本
- Bootstrap的x-editable行编辑
- What is `^M` and how do I get rid of it?
热点阅读