【问题标题】:How to run node webkit app in ubuntu 12.04?(Node js)如何在 ubuntu 12.04 中运行 node webkit 应用程序?(Node js)
【发布时间】:2015-05-26 06:07:18
【问题描述】:

我是新的nodewebkit。我创建了一个简单的hello world应用程序。

index.html

<html>
    <head>
        <title>Webkit</title>
    </head>
    <body>
        Hello world
    </body>
</html>

package.json

{
  "name": "sample",
  "version": "1.0.0",
  "description": "",
  "main": "index.html",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
   "window": {
    "title": "Hello world",
    "toolbar": false,
    "position": "center",
    "width": 800,
    "height": 650,
    "min_width": 800,
    "min_height": 650,
    "frame": true,
    "show": false
  },
  "author": "",
  "license": "ISC"
}

然后我使用 .nw 扩展名 (sample.nw) 进行了压缩 毕竟我已经通过nodewebkit 命令执行但我得到以下错误

24012:0526/113323:ERROR:browser_main_loop.cc(162)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
LaunchProcess: failed to execvp:
/usr/lib/node_modules/nodewebkit/nodewebkit/nw
LaunchProcess: failed to execvp:
/proc/self/exe
[24012:0526/113324:ERROR:child_process_launcher.cc(344)] Failed to launch child process
[24012:0526/113324:ERROR:channel.cc(316)] RawChannel read error (connection broken)

有人可以帮助运行应用程序吗?谢谢

【问题讨论】:

  • 尝试将你有这两个文件的文件夹放到nodewebkit文件夹中的nw.exe上,看看它是否打开。

标签: html node.js node-webkit


【解决方案1】:

我认为你没有正确安装nodewebkit

请根据操作系统从https://github.com/nwjs/nw.js最新版本安装,并在安装位置替换nodewebkit工具

【讨论】:

    猜你喜欢
    • 2019-10-14
    • 2015-04-26
    • 2018-04-09
    • 2017-08-04
    • 2014-12-07
    • 1970-01-01
    • 2015-05-07
    • 2014-03-11
    • 1970-01-01
    相关资源
    最近更新 更多