本文介绍了无法运行Electron应用-EINVAL:无效参数,lstat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试运行我的应用程序时,都会出现以下错误:

I'm getting the following error whenever I try to run my app:

我的 package.json

{
  "name": "SteamCMD-GUI",
  "productName": "SteamCMD GUI",
  "version": "0.0.1",
  "main": "main.js",
  "author": "avi12",
  "scripts": {
    "start": "electron .",
    "package": "asar pack \"SteamCMD GUI-win32-x64\" \"SteamCMD GUI.asar\"",
    "build-windows": "electron-packager . --platform=win32 --overwrite --out=release-builds --prune=true --icon=image/icon.ico --asar",
    "build-linux": "electron-packager . --platform=linux --overwrite --out=release-builds --prune=true --icon=image/icon.png --asar",
    "build-mac": "electron-packager . --platform=darwin --overwrite --out=release-builds --prune=true --icon=image/icon.icns --asar"
  },
  "dependencies": {
    "bignumber.js": "^5.0.0",
    "chokidar": "^1.7.0",
    "decompress": "^4.2.0",
    "electron": "^1.8.4",
    "electron-dl": "^1.11.0",
    "fs-jetpack": "^1.3.0",
    "jquery": "^3.3.1",
    "node-fetch": "^1.7.3",
    "onsenui": "^2.9.2",
    "sudo-prompt": "^7.1.1",
    "tooltip.js": "^1.2.0"
  }
}

我该如何解决? / p>

How can I solve this?

推荐答案

搜索该错误导致我,这表明在 libuv (Node使用的IO库)中存在问题。此问题已在更高版本的libuv中得到修复,该版本已由Node的更高版本所使用,而Noden的更高版本也由Electron所使用。

Searching for that error led me here, which suggests that it's a problem in libuv, an IO library used by Node. This issue is fixed in a later version of libuv, which is used by a later version of Node, which is used by a later version of Electron.

更新到Electron 2.0解决了这个问题。

Updating to Electron 2.0 solves this issue.

这篇关于无法运行Electron应用-EINVAL:无效参数,lstat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 17:54