【问题标题】:There is no 'package.json' - node-webkit app没有“package.json”-node-webkit 应用程序
【发布时间】:2016-03-31 21:35:25
【问题描述】:

我正在使用 node-webkit 制作我的第一个桌面应用程序。
我按照所有步骤在 Windows 上打包应用程序,但出现此错误:

There is no 'package.json' in the package, please make sure the 'package.json' is in the root of the package.

虽然包在根目录下。

【问题讨论】:

    标签: node-webkit package.json


    【解决方案1】:

    示例 package.json 文件

    {
            "name": "name of app",
            "version": "1.0.0",
            "main": "index.html",
            "single-instance": true,
            "node-remote": "<local>",
            "window": {
                "title": "name to show in title bar",
                "icon": "icon to show in titlebar",
                "position": "center",
                "min_width": 1024,
                "min_height": 600,
                "toolbar": true,
                "width": 1362,
                "height": 768
            },
            "dependencies": {
                "express": "3.x"
            },
            "webkit": {
                "plugin": true
            }
        }
    

    【讨论】:

      【解决方案2】:

      好的,我发现了我的错误。事实上,我正在压缩包含 json 包和其他文件的文件夹。所以我做的是这样的:

      App.zip
      |
      |-App
         |-package.json
         |-Other files
      

      正确的是:

      App.zip
         |-package.json
         |-Other files
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-11-09
        • 2013-10-01
        • 2016-02-14
        • 2015-06-12
        相关资源
        最近更新 更多