我正在使用node-webkit制作我的第一个桌面应用程序。
我按照所有步骤在windows上打包应用程序,但我得到这个错误:
There is no 'package.json' in the package, please make sure the 'package.json' is in the root of the 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
}
}
好了,我发现我的错误了。实际上,我正在压缩包含json包和其他文件的文件夹。所以我做的是这样的:
App.zip
|
|-App
|-package.json
|-Other files
正确的是:
App.zip
|-package.json
|-Other files