zoukankan      html  css  js  c++  java
  • TypeScript学习笔记--初始化

    安装

    npm install -g typescript

    初始化ts.config问题

    mac 在实行tsc --init时,报bash: tsc: command not found

    • 解决办法:

      1. 输入cd ~/ 进入当前用户的home目录
      2. 打开并编辑bash_profile 执行命令
        open .bash_profile,若没有的话,则touch .bash_profile创建
      3. 在 bash_profile 文件中
      • 有两种方式:
        *

        export PATH=/usr/local/bin:$PATH
        export M3_HOME=/usr/local/Cellar/maven@3.3/3.3.9
        export PATH=$PATH:$M3_HOME/bin

      这个是后面添加export PATH=你安装的ts的目录,指向bin的,在安装时终端会提示,比如/usr/local/Cellar/node/8.0.0_1/lib/node_modules/typescript/bin/
      *

      PATH=$PATH:/usr/local/mysql/bin:/usr/local/Cellar/node/8.0.0_1/lib/node_modules/typescript/bin/
      

      这个是在后面添加:你安装的ts的目录,指向bin的,只要前面有路径,直接用:隔开
      4. 然后保存,关闭
      5. 运行source .bash_profile
      6. 再运行tsc --init,出现message TS6071: Successfully created a tsconfig.json file. 代表成功

  • 相关阅读:
    简单的登录验证小程序_python
    远程执行命令_python
    远程执行本地脚本_linux
    反射_python
    ssh oa项目介绍
    返回上一级过程
    ssh框架开发crm(客户关系系统总结)
    struct相对路径,绝对路径
    <s:textfield>标签回显
    ssh框架整合
  • 原文地址:https://www.cnblogs.com/sqh17/p/13570377.html
Copyright © 2011-2022 走看看