做公司网站比较好的,青岛媒体网地址,网页设计实训心得体会300字,网上卖东西怎么才能卖得好大家好#xff0c;我是烤鸭#xff1a; 采坑实录。 安装 YAPI 接口项目时出现的这个问题#xff0c;如果你不是这个情况出现的这个报错#xff0c;就不用继续看了。 YAPI的 github 地址: https://github.com/YMFE/yapi 1.场景 安装 YAPI 接口项目。当时日志没找#xff0c…大家好我是烤鸭 采坑实录。 安装 YAPI 接口项目时出现的这个问题如果你不是这个情况出现的这个报错就不用继续看了。 YAPI的 github 地址: https://github.com/YMFE/yapi 1.场景 安装 YAPI 接口项目。当时日志没找从github的看到有人提的issue跟我的一样如下。 2.报错信息
当前安装版本 1.5.7 连接数据库成功! 开始下载平台文件压缩包...http://registry.npm.taobao.org/yapi-vendor/download/yapi-vendor-1.5.7.tgz 部署文件完成正在安装依赖库... npm WARN deprecated nomnom1.5.2: Package no longer supported. Contact supportnpmjs.com for more info. jsonpath1.0.0 postinstall /data/my-yapi/vendors/node_modules/jsonpath node lib/aesprim.js generated/aesprim-browser.js sh: generated/aesprim-browser.js: Permission denied npm WARN eslint-config-modular4.2.2 requires a peer of eslint3.0.0 but none is installed. You must install peer dependencies yourself. npm WARN mongoose-auto-increment5.0.1 requires a peer of mongoose^4.1.12 but none is installed. You must install peer dependencies yourself. npm WARN yapi-vendor1.4.4 license should be a valid SPDX license expression npm WARN The package moment is included as both a dev and production dependency. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! jsonpath1.0.0 postinstall: node lib/aesprim.js generated/aesprim-browser.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the jsonpath1.0.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-02-11T09_05_54_645Z-debug.log 依赖库安装完成正在初始化数据库mongodb... yapi-vendor1.4.4 install-server /data/my-yapi/vendors node server/install.js Error: module.js:540 throw err; ^ Error: Cannot find module json-schema-faker at Function.Module._resolveFilename (module.js:538:15) at Function.Module._load (module.js:468:25) at Module.require (module.js:587:17) at require (internal/module.js:11:18) at Object. (/data/my-yapi/vendors/server/utils/commons.js:19:13) at Module._compile (module.js:643:30) at Object.Module._extensions..js (module.js:654:10) at Module.load (module.js:556:32) at tryModuleLoad (module.js:499:12) at Function.Module._load (module.js:491:3) at Module.require (module.js:587:17) at require (internal/module.js:11:18) at Object. (/data/my-yapi/vendors/server/install.js:3:17) at Module._compile (module.js:643:30) at Object.Module._extensions..js (module.js:654:10) at Module.load (module.js:556:32) 3.原因及解决方案 这个错误的原因在于 nodejs 的 运行权限和运行 yapi -server 的权限不一致。 解决
chown -R root:root /nodejs安装目录(环境变量配置的目录)