如何在Amazon EC2 CentOS上使用Electron.js

问题描述

我正在开发一个sap.ui.define(['sap/uxap/BlockBase'],function (BlockBase) { "use strict"; var setFieldGroupIdsRecursively = function (oControl,sFieldGroupIds) { var aPossibleAggregations = ["items","content","form","formContainers","formElements","fields","cells"]; if (oControl instanceof sap.m.InputBase || oControl instanceof sap.ui.comp.smartfield.SmartField) { oControl.setFieldGroupIds(sFieldGroupIds); return; } for (var i = 0; i < aPossibleAggregations.length; i += 1) { var aControlAggregation = oControl.getAggregation(aPossibleAggregations[i]); if (aControlAggregation) { // generally,aggregations are of type Array if (aControlAggregation instanceof Array) { for (var j = 0; j < aControlAggregation.length; j += 1) { setFieldGroupIdsRecursively(aControlAggregation[j],sFieldGroupIds); } } else { // ...however,with sap.ui.layout.form.Form,it is a single object *sigh* setFieldGroupIdsRecursively(aControlAggregation,sFieldGroupIds); } } } }; var BlockJobInfoPart1 = BlockBase.extend("sap.uxap.sample.SharedBlocks.employment.BlockJobInfoPart1",{ Metadata: { views: { Collapsed: { viewName: "sap.uxap.sample.SharedBlocks.employment.BlockJobInfoPart1",type: "XML" },Expanded: { viewName: "sap.uxap.sample.SharedBlocks.employment.BlockJobInfoPart1",type: "XML" } } },onBeforeRendering: function () { var aFieldGroupIds = this.getFieldGroupIds(),sFieldGroupIds = ""; if (aFieldGroupIds.length > 0) { sFieldGroupIds = aFieldGroupIds.join(); var oView = sap.ui.getCore().byId(this.getSelectedView()); if (oView) { var aContent = oView.getContent(); for (var j = 0; j < aContent.length; j++) { setFieldGroupIdsRecursively(aContent[j],sFieldGroupIds); } } } } }); return BlockJobInfoPart1; }); 项目,该项目将Express.js用于某些任务。

该项目在本地运行良好,但是在部署时,我面临着正确安装Electron并在服务器上使用它的问题。

要全局安装它:

Electron.js

要运行脚本,请执行以下操作:

sudo npm install -g electron --platform=linux --unsafe-perm=true --allow-root

尝试运行后发生此错误

/ usr / lib / node_modules / electron / dist / electron:加载共享库时出错:libatk-1.0.so.0:无法打开共享库文件:没有这样的文件或目录


环境:

Amazon EC2,CentOS 6,Node.js 10.20.1,NPM 6.14.7

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)