本地部署一个项目做接口测试,名字vueShop-api-server,源址vueShop-api-server: 电商后台管理系统,后端部分
1. 使用Navicat+MySQL导入数据库
2. 修改config\default.json数据库配置
3. 在项目文件夹使用管理员身份打开power shell
4. 使用Node.js,输入npm install安装依赖,输入app.js启动项目,报错:
(node:9856) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead. (Use `node --trace-deprecation ...` to show where the warning was created)
(node:9856) [DEP0055] DeprecationWarning: The `util.isRegExp` API is deprecated. Please use `arg instanceof RegExp` instead. (node:9856)
[DEP0047] DeprecationWarning: The `util.isDate` API is deprecated. Please use `arg instanceof Date` instead
信息是:
1. `DEP0044`: `util.isArray`被弃用,建议使用`Array.isArray()`。
2. `DEP0055`: `util.isRegExp`被弃用,建议使用`arg instanceof RegExp`。
3. `DEP0047`: `util.isDate`被弃用,建议使用`arg instanceof Date`
项目中还在使用旧`util`方法的库`nodejs-orm2`,尝试npm update更新依赖失败,
卸载旧版本orm,迁移到更现代的库typeorm
npm uninstall orm2
npm install typeorm
再次运行node app.js,成功解决。