开发者问题收集
我最近从 0.37 升级到了 electron v1.3,但在渲染器进程中找不到模块“remote”。仔细查阅了文档,但还是没有找到太多信息这是我的代码的一部分渲染器 JS 文件var remote = require('electron').remote;const ipcRenderer = require('electron').ipcRenderer;const session = rem
我正在用 TypeScript 开发一个 Electron 应用程序,遇到了一个令人沮丧的问题。我试图用以下代码从渲染器进程运行一个模块:import { remote } from 'electron'const myModule = remote.require('./my-module')我可以将remote.require与我的模块一起使用的唯一方法是将module.exports = m
我正在使用Electron 10和Node v12.6.3。我尝试从渲染器进程打开 FileDialog。这不是 SO 上关于此问题的第一个问题,但我找不到适合我的任何解决方案。nodeIntegrations已启用win = new BrowserWindow({webPreferences: {webSecurity: false,nodeIntegrationInWorker: true,n
这是在渲染器进程中:const {BrowserWindow} = require('electron').remoteconst path = require('path')const url = require('url')const newWindowButton = document.getElementById('new-window-btn');newWindowButton.addE
我想为我的无框窗口添加带有自定义按钮的自定义标题。我有两个脚本文件 -index.js,它在 Electron 启动时自动运行,以及app.js,它使用<script src>标签添加到index.html中。有一个问题 -require()不允许脚本工作 - 如果我需要任何模块,则没有任何行运行,不管它是什么。index.html:<head>...<script src="https://aj
他们给了我一个用 node.js 和 reactj 制作的网上商店项目,当我执行它时,它会加载网页,但随后会留下一个错误消息,这是因为在某些部分没有数据或没有代码,但我不想插入它,我的教授告诉我要设置一个条件,这样当我找不到代码时我也会上传网页,但我不知道在哪里放代码或在哪里采取行动,我是 stackoverflow 的新手,非常感谢 60 | let campaigns: any = [
我对 javascript 还很陌生。我正在按照tensorflow-js 教程操作,了解如何将 tensorflow-js 与 node.js 结合使用,但是当我运行示例代码时:const tf = require('@tensorflow/tfjs');// Load the binding:require('@tensorflow/tfjs-node'); // Use '@tensorf
我在 ubuntu 机器上尝试使用 tensorflow 时收到此错误。这是在新文件夹中全新安装的 npm。我尝试了其他帖子中的建议,但仍然无法获取。我是不是漏掉了什么?Initialization of backend tensorflow failedError: Could not locate the bindings file. Tried:→ /var/nodejs/tensor/no
我尝试在 Node.js express web 服务器中使用 @tensorflow/tfjs-node 模块。但是,我收到以下错误。我不明白为什么会收到此错误。我刚刚在 node.js 服务器中添加了 1 行代码。我使用“npm install @tensorflow/tfjs-node”完成安装。可能是什么问题?var tf = require ('@tensorflow/tfjs-node
我想创建一个使用 @tensorflow-models/qna 库的 Discord 机器人,但 4 个小时以来我一直收到相同的错误,没有任何进展。当我尝试运行此脚本时:const qna = require('@tensorflow-models/qna');(async () => {const passage = "Google LLC is an American multinationa
导入// Frontend - Vue.jsconst tfn = require('@tensorflow/tfjs-node')然后运行npm install --save @tensorflow/tfjs-node出现以下错误:npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:109
我已使用 electron-forge 创建了一个默认项目。当我尝试使用命令electron-forge打包我的项目时,该过程退出并显示以下错误。我做错了什么?我完全按照electron-forge上的说明进行操作。$ electron-forge package✔ Checking your system✔ Preparing to Package Application for arch: x
我刚刚使用以下命令创建了一个新应用程序:npx create-electron-app my-new-app --template=typescript-webpack在renderer.ts中,我添加了以下代码import "./index.css";import { ipcRenderer } from "electron";但是当我运行npm run start时,浏览器控制台中出现以下错误
以下是有关我正在使用的机器的一些信息:Node v14.17.0Electron v13.1.2Win 10 21H1Yarn 2.4.2我正尝试将我的项目放在:https://github.com/Cokaps/GenZOC工作,但我遇到了这个问题:当我运行 electron-forge start 时,它在此处显示错误:PS D:\GenZOC> yarn start✔ Checking yo
我按照Electron Forge 页面安装了 Electron 的模板。npx create-electron-app my-new-app --template=typescript-webpack之后,我在my-new-app文件夹中运行npm run start命令窗口中弹出以下错误消息$ npm run start> [email protected] start> electron-f