Electron 15: Module '"electron"' has no exported member 'WebviewTag'
ThomasOrlita opened this issue ยท 3 comments
After updating to Electron 15, TypeScript fails with:
node_modules/electron-context-menu/index.d.ts:4:2 - error TS2305: Module '"electron"' has no exported member 'WebviewTag'.
electron-context-menu/index.d.ts
Line 4 in 88cc807
I'm having the same problem, for now you can get around it by requiring it like this until it gets fixed:
// eslint-disable-next-line @typescript-eslint/no-var-requires
const contextMenu = require("electron-context-menu");
I'm having the same problem, for now you can get around it by requiring it like this until it gets fixed:
// eslint-disable-next-line @typescript-eslint/no-var-requires const contextMenu = require("electron-context-menu");
This works ๐ However (unless I am missing a step), it disables the typings, is that right?
Another option I found while searching for a solution was to modify tsconfig:
"compilerOptions": {
"skipLibCheck": true
}
This seems to also work, without the side effect of disabling typings. But is there another downside that I am missing here? Someone more clued in with Typescript can hopefully chip in if so.
Another option I found while searching for a solution was to modify tsconfig:
"compilerOptions": { "skipLibCheck": true }
This seems to also work, without the side effect of disabling typings. But is there another downside that I am missing here? Someone more clued in with Typescript can hopefully chip in if so.
I ended up doing this too because so many of the libraries I was using have this same issue