我正在使用node-webkit创建我的第一个桌面应用程序 我按照所有步骤在Windows上打包应用程序,但是我收到了这个错误:
There is no 'package.json' in the package, please make sure the 'package.json' is in the root of the package.
虽然包在根目录中。
答案 0 :(得分: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
}
}
答案 1 :(得分:0)
好的,我发现了自己的错误。实际上,我正在压缩包含json包和其他文件的文件夹。所以我所做的是这样的:
App.zip
|
|-App
|-package.json
|-Other files
这是正确的:
App.zip
|-package.json
|-Other files