node.js - Error running electron-windows-store for packaging Electron app - Stack Overflow

admin2025-04-17  2

I'm trying to package my Electron app to submit to the Windows Store, following the documentation here: but I'm encountering an error when using the electron-windows-store CLI tool. I followed the steps from the official Electron documentation for Windows Store apps.

Here's the command I ran in an elevated PowerShell:

 electron-windows-store --input-directory C:\Users\marti\Documents\projects\RenderTune\dist\win-unpacked --output-directory C:\Users\marti\Documents --package-version 1.0.0.0 --package-name RenderTune 

During the setup, I answered some interactive prompts about the Desktop App Converter and the development certificate. After the configuration, when the packaging process started, I received the following error:

 TypeError: Cannot read properties of undefined (reading 'match') at C:\Users\marti\AppData\Roaming\nvm\v20.9.0\node_modules\electron-windows-store\lib\params.js:86:29 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Node.js v20.9.0 

It seems to fail when trying to handle the development certificate, but I'm not sure why program.devCert is undefined since the tool didn't prompt me to specify a path for a development certificate.

Has anyone encountered this issue, or can anyone help troubleshoot why this error might be occurring and how to resolve it? Any insights would be greatly appreciated!

I'm trying to package my Electron app to submit to the Windows Store, following the documentation here: https://www.electronjs.org/docs/latest/tutorial/windows-store-guide but I'm encountering an error when using the electron-windows-store CLI tool. I followed the steps from the official Electron documentation for Windows Store apps.

Here's the command I ran in an elevated PowerShell:

 electron-windows-store --input-directory C:\Users\marti\Documents\projects\RenderTune\dist\win-unpacked --output-directory C:\Users\marti\Documents --package-version 1.0.0.0 --package-name RenderTune 

During the setup, I answered some interactive prompts about the Desktop App Converter and the development certificate. After the configuration, when the packaging process started, I received the following error:

 TypeError: Cannot read properties of undefined (reading 'match') at C:\Users\marti\AppData\Roaming\nvm\v20.9.0\node_modules\electron-windows-store\lib\params.js:86:29 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Node.js v20.9.0 

It seems to fail when trying to handle the development certificate, but I'm not sure why program.devCert is undefined since the tool didn't prompt me to specify a path for a development certificate.

Has anyone encountered this issue, or can anyone help troubleshoot why this error might be occurring and how to resolve it? Any insights would be greatly appreciated!

Share Improve this question edited Feb 1 at 0:22 Olaf 5,2522 gold badges18 silver badges26 bronze badges asked Jan 31 at 23:45 MartinMartin 1,6024 gold badges43 silver badges91 bronze badges 3
  • Error is clear that the library did not get the devCert path. If you have the developer certificate, you can manually pass it with the command --dev-cert C:\\location\devcert.pfx. – Raghavendra N Commented Feb 4 at 9:31
  • I don't have a .pfx file, and am trying to figure out where to download or generate one – Martin Commented Feb 4 at 18:02
  • It's been a long time since I last worked on this. Check if this helps. – Raghavendra N Commented Feb 5 at 10:50
Add a comment  | 

1 Answer 1

Reset to default 0

I got the same error, it was fixed creating a certificate with the tool, but now i get a different error

Check what John says in this issue if it helps:

https://github.com/electron-userland/electron-windows-store/issues/118

Hope it helps

转载请注明原文地址:http://anycun.com/QandA/1744843337a88396.html