博客
关于我
使用Angular Cli 快速搭建工程
阅读量:301 次
发布时间:2019-03-03

本文共 827 字,大约阅读时间需要 2 分钟。

Angular-Cli is more than tool,it is a platform!

一、安装Angular-Cli

经过n次的失败安装,终于在最后一次安装成功,为了使同学们少走弯路,现将经验写下来:

1、查看你的node以及npm版本:

      node -v    查看node版本

      npm -v      查看npm版本

要求所有版本都是最新的,不然可能会出错。

2、设置淘宝镜像,这样下载东西就是从国内网站下载了,网速更快

        npm configset registry https://registry.npm.taobao.org

3、因为angular-cli是用typescript写的,所以要先装这两个:
   npm install -g typescript typings

4、安装angular-cli:

       npm install -g angular-cli@latest

   如果你之前安装失败过,最好在安装angular-cli之前先卸载干净,用以下两句:
      npm uninstall -g angular-cli
      npm cache clean 
同时,在检查你全局的那些npm文件下还残留下图这两个文件,
有的话也要删掉,删掉后再用"npm install -g angular-cli@latest"安装最新的angular-cli即可。

5. 
输入 ng -v,有版本信息说明安装成功

6.建立AngularJS2的项目 
在桌面上建立一个文件夹,命令行进入这个文件夹的位置,然后输入:

ng new 名字  //新建项目ng server    //启动项目输入网址
二、失败以及解决办法
1、缺少Python环境
      a、下载
     
     b、安装
     最好安装在C盘
     c、配置环境变量,有些同学是在公司,有时候没有权限配置系统环境变量,那么在用户变量哪里配置也是可以的
电脑->属性->高级配置->环境变量->把安装的Python路径复制到path里面就可以了

     
你可能感兴趣的文章
NMAP网络扫描工具的安装与使用
查看>>
NMF(非负矩阵分解)
查看>>
nmon_x86_64_centos7工具如何使用
查看>>
NN&DL4.1 Deep L-layer neural network简介
查看>>
NN&DL4.3 Getting your matrix dimensions right
查看>>
NN&DL4.7 Parameters vs Hyperparameters
查看>>
NN&DL4.8 What does this have to do with the brain?
查看>>
nnU-Net 终极指南
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>
no available service ‘default‘ found, please make sure registry config corre seata
查看>>
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>