## 开发
nodejs手动升级到16 ，npm run dev 如下错误
可在npm install后手动修改报错的Defaults.js文件
在第九行后增加一行
os.hostname=()=>"localhost"

增加后
const os = require('os');
os.hostname=()=>"localhost"


node:os:68
      throw new ERR_SYSTEM_ERROR(ctx);
      ^

SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_gethostname returned ENOSYS (function not implemented)
    at new Defaults (D:\mywork\ehs-tanghHe\ehs\ruoyi-ui\node_modules\@achrinza\node-ipc\entities\Defaults.js:26:20)
    at new Parser (D:\mywork\ehs-tanghHe\ehs\ruoyi-ui\node_modules\@achrinza\node-ipc\entities\EventParser.js:8:14)
    at Object.<anonymous> (D:\mywork\ehs-tanghHe\ehs\ruoyi-ui\node_modules\@achrinza\node-ipc\dao\client.js:11:19)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (D:\mywork\ehs-tanghHe\ehs\ruoyi-ui\node_modules\@achrinza\node-ipc\services\IPC.js:4:14) {
  code: 'ERR_SYSTEM_ERROR',
  info: {
    errno: -4054,
    code: 'ENOSYS',
    message: 'function not implemented',
    syscall: 'uv_os_gethostname'
  },
  errno: [Getter/Setter],
  syscall: [Getter/Setter]
}



```bash
# 克隆项目
git clone https://gitee.com/y_project/RuoYi-Vue

# 进入项目目录
cd ruoyi-ui

# 安装依赖
n

# 建议不要直接使用 cnpm 安装依赖，会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npmmirror.com

# 启动服务
npm run dev
```

浏览器访问 http://localhost:80

## 发布

```bash
# 构建测试环境
npm run build:stage

# 构建生产环境
npm run build:prod
```