ng2-admin安装问题
2024-09-02 05:16:22
问题一 启动项目出现如下error:
原理:
暂不清晰, 目前认为是项目本身的问题。 项目作者在博文中给出了相应的解决方案。
具体解决方案:
如果之前装过angular-cli需要先卸载:npm uninstall -g angular-cli 如果之前装过@angular/cli需要先卸载:npm uninstall -g @angular/cli 如果你之前已经尝试安装过node模块,请把NiceFish根目录下的node_moduels目录删掉 然后依次执行以下命令:
- npm cache clean
- npm i -g cnpm
- cnpm i -g @angular/cli
- cnpm install
- 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
最新文章
- rbd cache (一)
- AspNetPager控件分页使用方法
- iphone按home键后,正在运行的程序是否退出了呢?
- 解决phpMyAdmin“登录超时 (1440 秒未活动),请重新登录”的问题
- SVN版本更新后,upData工程之后,Xcode 工程文件打不开解决办法
- 【OpenStack】OpenStack系列4之Glance详解
- ASP.NET的运行原理与运行机制 如何:为 IIS 7.0 配置 <;system.webServer>; 节
- “typedef int (init_fnc_t) (void);“的含义
- 8数码,欺我太甚!<;bfs+康拓展开>;
- 1702: [Usaco2007 Mar]Gold Balanced Lineup 平衡的队列
- Ubuntu on win10
- 苹果OS系统安装Xcode方法
- Exp3 免杀原理与实践 20164302 王一帆
- 使用node.js &; live server在移动端测试网站
- HDFS简述
- [疑难杂症]__当你的Cortana搜索无法使用,显示纯白界面(ps:已解决).
- eclipse常用快捷键和插件
- Spring MVC基础知识整理➣国际化和异常处理
- 手把手教你提交文件到git
- SpringBoot整合Servlet的两种方式