我尝试将我的应用发布到Windows 10应用商店,但遇到错误,我似乎找不到解决方案。
> node build-store.js
Configuration:
Desktop Converter Location: false
Expanded Base Image: false
Publisher: CN=******************
Dev Certificate: C:\data\certs\devcert.pfx
Windows Kit Location: C:\Program Files (x86)\Windows Kits\10\bin\x64
Starting Conversion...
Cleaning pre-appx output folder...
Copying data...
Creating manifest..
Creating priconfig...
events.js:186
throw er; // Unhandled 'error' event
^
Error: spawn C:\Program Files (x86)\Windows Kits\10\bin\x64\makepri.exe ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x64\\makepri.exe',
path: 'C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x64\\makepri.exe',
spawnargs: [
'createconfig',
'/cf',
'pre-appx\\priconfig.xml',
'/dq',
'en-US',
'/a'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-armory-app@1.3.0 appx: `node build-store.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-armory-app@1.3.0 appx script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
构建存储文件如下所示:
const convertToWindowsStore = require('electron-windows-store');
convertToWindowsStore({
containerVirtualization: false,
inputDirectory: 'C:\\data\\PRIVATE\\my-armory-app',
outputDirectory: 'C:\\data\\PRIVATE\\my-armory-app-APPX',
packageVersion: '1.3.0',
packageName: 'My Armory App',
packageDisplayName: 'My Armory App',
deploy: false,
publisher: 'CN=***************',
windowsKit: 'C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x64',
devCert: 'C:\\data\\certs\\devcert.pfx',
certPass: '**********',
makeappxParams: ['/l'],
signtoolParams: ['/p'],
makePri: true,
createConfigParams: ['/a'],
createPriParams: ['/b'],
finalSay: function () {
return new Promise((resolve, reject) => resolve())
}
});
2条答案
按热度按时间lvjbypge1#
如您所见,
错误:生成C:\程序文件(x86)\Windows工具包\10\bin\x64\makepri.exe ENOENT
它表明文件不存在于特定的地方)。
确保文件夹中存在
C:\\Program Files (x86)\\Windows Kits\\10\
此外,请检查与该文件夹关联的所有权限。
6kkfgxo02#
这对我很有帮助。当提示输入Windows SDK bin文件夹时,不要将
您需要为特定版本和体系结构指定文件夹。
对我有用。