YMFE / yapi

YApi 是一个可本地部署的、打通前后端及QA的、可视化的接口管理平台
http://yapi.smart-xwork.cn/
Apache License 2.0
27.38k stars 4.8k forks source link

部署一直不成功 #2251

Open xieguocheng opened 3 years ago

xieguocheng commented 3 years ago

版本号

~ 1.50

什么问题

~Error: /home/risk/my-yapi/vendors/server/utils/commons.js:25 jsf.extend('mock', function () { ^

TypeError: jsf.extend is not a function at Object. (/home/risk/my-yapi/vendors/server/utils/commons.js:25:5) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object. (/home/risk/my-yapi/vendors/server/install.js:3:17) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16)

如何复现此问题

~ node版本7.6+以上的都使用过了(包括8+,10+,12+,14+的)都会出现这个问题

什么浏览器

~ 谷歌浏览器

什么系统(Linux, Windows, macOS)

centos7安装部署

hhniao commented 3 years ago

此处我注释掉以后, 是可以执行. 但是接下来有一堆错误. 看起来不是这个地方引起的 [HMR] bundle has 21 errors client.js?444d:196 ./client/components/Loading/Loading.jsModule build failed: TypeError: Cannot read property 'replace' of undefined at EventEmitter.module.exports.api.report (D:\app\yapi\vendors\node_modules\eslint\lib\eslint.js:991:31) at RuleContext.report (D:\app\yapi\vendors\node_modules\eslint\lib\rule-context.js:130:25) at checkDeprecation (D:\app\yapi\vendors\node_modules\eslint-plugin-react\lib\rules\no-deprecated.js:126:15) at D:\app\yapi\vendors\node_modules\eslint-plugin-react\lib\rules\no-deprecated.js:172:37 at Array.forEach () at Object.checkLifeCycleMethods (D:\app\yapi\vendors\node_modules\eslint-plugin-react\lib\rules\no-deprecated.js:172:17) at EventEmitter.updatedRuleInstructions. (D:\app\yapi\vendors\node_modules\eslint-plugin-react\lib\util\Components.js:1016:45) at EventEmitter.emit (events.js:327:22) at NodeEventGenerator.applySelector (D:\app\yapi\vendors\node_modules\eslint\lib\util\node-event-generator.js:265:26) at NodeEventGenerator.applySelectors (D:\app\yapi\vendors\node_modules\eslint\lib\util\node-event-generator.js:294:22) at NodeEventGenerator.enterNode (D:\app\yapi\vendors\node_modules\eslint\lib\util\node-event-generator.js:308:14) at CodePathAnalyzer.enterNode (D:\app\yapi\vendors\node_modules\eslint\lib\code-path-analysis\code-path-analyzer.js:602:23) at CommentEventGenerator.enterNode (D:\app\yapi\vendors\node_modules\eslint\lib\util\comment-event-generator.js:98:23) at Traverser.enter (D:\app\yapi\vendors\node_modules\eslint\lib\eslint.js:929:36) at Traverser.__execute (D:\app\yapi\vendors\node_modules\estraverse\estraverse.js:330:31) at Traverser.traverse (D:\app\yapi\vendors\node_modules\estraverse\estraverse.js:434:28) @ ./client/Application.js 58:15-54./client/components/MyPopConfirm/MyPopConfirm.jsModule build failed: TypeError: Cannot read property 'replace' of undefined at EventEmitter.module.exports.api.report (D:\app\yapi\vendors\node_modules\eslint\lib\eslint.js:991:31) at RuleContext.report (D:\app\yapi\vendors\node_modules\eslint\lib\rule-context.js:130:25) at checkDeprecation (D:\app\yapi\vendors\node_modules\eslint-plugin-react\lib\rules\no-deprecated.js:126:15) at D:\app\yapi\vendors\node_modules\eslint-plugin-react\

jessezhang001 commented 3 years ago

用 YApi Pro( https://github.com/yapi-pro/yapi )这个分支来部署,已经解决了这个问题。