问题一 启动项目出现如下error:

原理:

暂不清晰, 目前认为是项目本身的问题。 项目作者在博文中给出了相应的解决方案。

具体解决方案:

如果之前装过angular-cli需要先卸载:npm uninstall -g angular-cli 如果之前装过@angular/cli需要先卸载:npm uninstall -g @angular/cli 如果你之前已经尝试安装过node模块,请把NiceFish根目录下的node_moduels目录删掉 然后依次执行以下命令:

  1. npm cache clean
  2. npm i -g cnpm
  3. cnpm i -g @angular/cli
  4. cnpm install
  5. ng serve

问题二: ERROR in AppModule is not an ngModule

和这个问题一起出现的还有这个问题。

The "@angular/compiler-cli"package was not properly installed.

问题提示  "@angular/compiler-cli" 没有正确安装,我们卸载后重新安装了一遍还报这个错。然后没有管他。去解决ERROR in AppModule is not an ngModule 了。  等解决好ERRORin AppModule is not an ngModule, 它也不报错了。 具体原因不详。

ERROR in AppModule is not an ngModule错误原理:

推测是因为项目配置文件中写明的typescript文件版本和已安装的typescript文件版本不同造成的。

解决方案:

package.json文件中的"typescript"改为: "^2.1.0"

然后 cnpminstall

用npm ls typescript  查看文件版本和配置文件中写的是否一致。 还有框里是不是出现了不同的版本号。

这样的是不行的。

这样就行了。

 
 转自:http://blog.csdn.net/srk950606

最新文章

  1. rbd cache (一)
  2. AspNetPager控件分页使用方法
  3. iphone按home键后,正在运行的程序是否退出了呢?
  4. 解决phpMyAdmin“登录超时 (1440 秒未活动),请重新登录”的问题
  5. SVN版本更新后,upData工程之后,Xcode 工程文件打不开解决办法
  6. 【OpenStack】OpenStack系列4之Glance详解
  7. ASP.NET的运行原理与运行机制 如何:为 IIS 7.0 配置 <system.webServer> 节
  8. “typedef int (init_fnc_t) (void);“的含义
  9. 8数码,欺我太甚!<bfs+康拓展开>
  10. 1702: [Usaco2007 Mar]Gold Balanced Lineup 平衡的队列
  11. Ubuntu on win10
  12. 苹果OS系统安装Xcode方法
  13. Exp3 免杀原理与实践 20164302 王一帆
  14. 使用node.js & live server在移动端测试网站
  15. HDFS简述
  16. [疑难杂症]__当你的Cortana搜索无法使用,显示纯白界面(ps:已解决).
  17. eclipse常用快捷键和插件
  18. Spring MVC基础知识整理➣国际化和异常处理
  19. 手把手教你提交文件到git
  20. SpringBoot整合Servlet的两种方式

热门文章

  1. Spring和SpringMVC配置中父子WebApplicationContext的关系
  2. JS frame 跨域 传值
  3. [POI2008] Poc (原名 Trians) Treap+Hash
  4. 一些比较高效的CSS写法建议
  5. java的多构造函数的处理方式
  6. wget、yum、rpm、apt-get区别
  7. 栈与递归的实现(Hanoi塔问题等等)
  8. HDU5772 String problem
  9. Android 全面插件化 RePlugin 流程与源码解析
  10. 在linux下搭建wiki环境【转】