window安装swagger editor

1.下载 nodejs并安装

2. 下载swagger editor并安装

  2.1 git clone https://github.com/swagger-api/swagger-editor.git //从github下载swagger-editor

  2.2  cd swagger-editor //进入到下载的文件夹中

  2.3 npm install

  2.4 cd ..  //回退到上一曾目录

  2.5 http-server swagger-editor  //启动swagger-editor

3. 问题

  3.1 在运行 npm install 命令的时候报错(npm ERR! errno -4048,Error:EPERM:operation not permitted) 搞了好半天。怎么搞定的呢?

    3.1.1、 用管理员权限打开 DOS窗口

    3.1.2、运行npm cache clean --force

    3.1.3、再运行 npm install

    然后就能够能够成功install了。 

  3.2 如果运行 http-server swagger-editor的时候出现 http-server commond not found 这个错误的时候,就要去安装一下http-server

    命令: npm install http-server -g

原文地址:https://www.cnblogs.com/happyflyingpig/p/7852148.html