javascript - 无法加载 electro-builder.ps1,因为正在运行

标签 javascript electron desktop-application

我尝试使用 js electro 将网站转换为桌面应用程序,但在构建我的 exe 应用程序时发现了这个问题:

electron-builder : File C:\Users\firas lweti\AppData\Roaming\npm\electron-builder.ps1 cannot be loaded because running
scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ electron-builder --win
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

enter image description here

我需要将我的网站转换为桌面应用

最佳答案

这是一个拒绝脚本执行的 powershell 配置。 你需要将其设置为允许 打开终端并输入:

Set-ExecutionPolicy RemoteSigned

它会要求确认,选择选项[A]确认

enter image description here

关于javascript - 无法加载 electro-builder.ps1,因为正在运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74239583/

相关文章:

java - Windows : signaling a Java process to show its window

c# - 有没有办法强制应用程序以单线程方式运行?

javascript - React 检查 css 是否已使用 Webpack 和 React 加载

javascript - Electron/JavaScript : Detect when window is un/maximized

javascript - jquery 单选按钮的验证规则

node.js - 没有为 channel 注册的处理程序 - Electron IPC 处理/调用

javascript - 带有反应模板的 Electron 锻造应用程序的 index.html 中的 "Uncaught ReferenceError: require is not defined"

c# - .NET GC 停止桌面应用程序 - 性能问题

javascript - Axios 拦截器请求在 VueJs 中过期时刷新 id token

javascript - 查询按日期排序的嵌套子项