gpt4 book ai didi

node.js - 在 Ubuntu 中配置 vs-code 调试 electron

转载 作者:搜寻专家 更新时间:2023-10-31 23:26:37 25 4
gpt4 key购买 nike

我是 nodejs 的新手,尝试使用 Electron 制作桌面应用程序。我尝试调试来自 https://github.com/szwacz/electron-boilerplate 的样板代码在 Ubuntu 中的 vs 代码中

这是我的 launch.json:

{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Electron",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/app/app.js",
"stopOnEntry": false,
"args": [],
"cwd": "${workspaceRoot}",
"preLaunchTask": null,
"runtimeExecutable": "${workspaceRoot}/node_modules/electron-prebuilt/dist/electron",
"runtimeArgs": [
".",
"--enable-logging"
],
"env": {
"NODE_ENV": "development"
},
"console": "internalConsole",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858,
"address": "localhost",
"restart": false,
"sourceMaps": false,
"outDir": null,
"localRoot": "${workspaceRoot}",
"remoteRoot": null
},
{
"name": "Attach to Process",
"type": "node",
"request": "attach",
"processId": "${command.PickProcess}",
"port": 5858,
"sourceMaps": false,
"outDir": null
}
]
}

我收到这个错误:

Error: No such module: atom_browser_v8_util
at Error (native)
at process.atomBinding (/media/manoj/F6741AD7741A9B07/Node/Electrone/electron-boilerplate/node_modules/electron-prebuilt/dist/resources/electron.asar/common/init.js:5:20)
at Object.<anonymous> (/media/manoj/F6741AD7741A9B07/Node/Electrone/electron-boilerplate/node_modules/electron-prebuilt/dist/resources/electron.asar/browser/api/browser-window.js:6:24)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)

我哪里错了?

最佳答案

我遇到了同样的问题,但只通过更改项目文件夹名称就解决了。虽然我不知道发生了什么,但您可以尝试一下。

关于node.js - 在 Ubuntu 中配置 vs-code 调试 electron,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39831882/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com