2015-07-13 47 views
0

我正在使用node-webkit製作我的第一個桌面應用程序。
我按照所有的包裝上的窗口應用程序的步驟,但我得到這個錯誤:沒有'package.json' - node-webkit應用程序

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

雖然包的根。

回答

0

好吧,我發現我的錯誤。事實上,我正在壓縮包含json包和其他文件的文件夾。所以我做了什麼是這樣的:

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

什麼是正確的是:

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

樣本的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 
     } 
    }