electron调用app.getAppPath报错“TypeError: Cannot read properties of undefined”

img

如图所示,在主进程调用这个函数会报错,想知道如何解决这个问题

这个api是electron v0.30.0添加的,只要你版本不低于这个应该是由的,你试试这样引入app关键字

import { app } from 'electron'

然后再去使用app.getAppPath()

朋友 解决没