【问题标题】:How can I build and run the byteball desktop app?如何构建和运行 byteball 桌面应用程序?
【发布时间】:2018-06-12 16:16:14
【问题描述】:

我知道我们应该在桌面上运行带有 nw.js 框架的 byteball 应用程序。 所以我确实喜欢下面。 1.git克隆 2.凉亭安装 3. npm 安装 4. 咕哝

在这些之后,我在 MacOS 上使用nwjs . 启动了该应用程序。 此刻,它说:

module.js:365
    throw err;
    ^
Error: Cannot find module 

'/Users/dev/Documents/work/byteball/byteball/node_modules/byteballcore/node_modules/sqlite3/lib/binding/node-webkit-v0.14.7-darwin-x64/node_sqlite3.node'
at Function.Module._resolveFilename (module.js:363:15)
at Function.Module._load (module.js:309:25)
at Module.require (module.js:391:17)
at require (internal/module.js:20:19)
at Object.<anonymous>

  (/Users/dev/Documents/work/byteball/byteball/node_modules/byteballcore/node_modules/sqlite3/lib/sqlite3.js:4:15)
at Module._compile (module.js:437:34)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:381:32)
at Function.Module._load (module.js:338:12)
at Module.require (module.js:391:17)

对于这些错误,在 byteball 存储库中有解决方案,例如 https://github.com/byteball/byteball

于是我找到了node-v47-darwin-x64 目录,但是没有找到。 目前,我可以启动 byteball 桌面应用程序,但无法进入主屏幕,因为当我单击 continue 按钮时它已停止并且无法调试。 如何在桌面上运行此应用?

【问题讨论】:

    标签: nw.js node-sqlite3


    【解决方案1】:

    这是我在 linux 上所做的:

    cp -ir node_modules/sqlite3/lib/binding/node-v*-linux-x64 node_modules/sqlite3/lib/binding/node-webkit-v$NW_VERSION-linux-x64
    

    您必须使用您正在使用的 NW 版本创建一个副本。 byteball README 说 copy as node-webkit-v0.14.7-darwin-x64 但假设您安装了 NW 0.14.7。

    如果您想调试应用程序,您将需要 NW.js 的 SDK 版本: https://dl.nwjs.io/v0.14.7/nwjs-sdk-v0.14.7-osx-x64.zip

    【讨论】:

    • 那么,我需要安装 sqlite3 版本 0.14.7 吗?以及如何使用 nwjs sdk 源进行调试?
    • 我可以使用 SDK 文件夹中的 nwjs 吗?
    • 不,您不必安装 sqlite3 v0.14.7。您只需复制在npm install 期间安装的 sqlite 库。请参阅我的答案中的复制命令。
    • 你可以在钱包窗口中右键调试钱包,在弹出的窗口中选择“检查后台页面”。
    • 当我使用npm install 安装节点模块时,node_modules/sqlite3/lib/binding 中只有一个目录。那么,我需要创建名为node-webkit-v0.14.7-darwin-x64 的新目录吗?并在那里复制node_sqlite3.node 文件?
    【解决方案2】:

    彼得·米克洛斯。 我解决了这个问题。 之前,我按照自述文件进行操作,但失败了。 因为我使用了更高的 node.js 版本。 当时,我使用的是节点 8.9.4。 现在,我将节点版本降级到 5.12.0,如 README 中所述。 降级后做了npm install,生成了node-v47-darwin-x64目录。但是当我使用节点 8.9.4 时,产生了node-v57-darwin-x64 目录。因此,即使我复制并制作了“node-webkit-v0.14.7-darwin-x64”,它也没有被执行。 目前,它运作良好...... 感谢您的宝贵时间。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-17
      • 1970-01-01
      • 2019-06-25
      • 2023-04-09
      • 1970-01-01
      • 2013-05-03
      • 1970-01-01
      相关资源
      最近更新 更多