有时在运行项目或者打包项目的时候会遇到报错信息:found version 4, expected 3,

这个大概意思是说该插件需要的依赖当前不支持,需要提高依赖的版本。

比如:@angular/compiler-cli、@angular/common、@angular/compiler、@angular/core,这些依赖升级后,其他的一些依赖也要跟着升级才能正常使用。

没有对应升级控制台会提示:

一些相应依赖同时要升级的有以下一些:

https://stackoverflow.com/questions/47158604/error-in-metadata-version-mismatch-for-module-node-modules-angular2-cool-storag

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

2、打包的时候提示Javascript内存溢出的情况,如下:

网上有说方法,但是测试我这个不可以,之前cnpm install下载的就没问题,这是换了npm install后出现的,于是将node_modules删除了,使用cnpm install,然后再ng build --prod就不报这错了,但是提示一些package.json找不到,这是cnpm install下载的原因,使用ng build --prod --no-extract-license打包就可以啦。

也可以将对应的package.json往外移动一级目录。

最新文章

  1. C#调用webservice 时如何传递实体对象
  2. redis web 客户端工具 redis-admin
  3. Linux启动过程详解(转)
  4. UVa 1609 (博弈) Foul Play
  5. Visual Studio 2013无法打开IIS Express Web的解决办法
  6. 基于Tengine的反向代理详细配置
  7. 最新版FreeTextBox(版本3.1.6)在ASP.Net 2.0中使用简介
  8. FileOutputStream字节输出流和FileInputStream输入流(切记:out是输出到本地中,in是输入到程序中)这里介绍大文件和小文件的读取方式
  9. error: QApplication: No such file or directory
  10. Spring基础篇——DI和AOP初识
  11. java Socket实现简单在线聊天(三)
  12. Vue.js 牛刀小试(持续更新~~~)
  13. Jupyter Notebook的安装
  14. SNF软件开发机器人-子系统-表单-表单设计
  15. 阿里云服务器安装SQLServer本地无法远程访问
  16. 数据库和redis的一致性
  17. laravel 5.4在控制器构造函数中获取auth中间件失败
  18. unity opaque sort
  19. 打开 EXCEL时出现RUN-TIME ERROR“91”,怎么解决?
  20. oracle 归档模式、补充日志

热门文章

  1. CSS中的相关概念
  2. rest_framework 认证功能
  3. 转】关于cgi、FastCGI、php-fpm、php-cgi
  4. 36.创建模板mylist
  5. Tomcat vs. Jetty vs. Undertow: Comparison of Spring Boot Embedded Servlet Containers
  6. 使用goroutine+channel和java多线程+queue队列的方式开发各有什么优缺点?
  7. JDOJ 2939: Suffix Automaton 广义后缀自动机_统计子串
  8. BZOJ 3626 LCA(离线+树链剖分+差分)
  9. easyui-combobox实现取值范围的联动
  10. uikit学习