question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: electron is not a function

See original GitHub issue

using Vite3.0.3

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:16

github_iconTop GitHub Comments

2reactions
BalotTcommented, Jul 29, 2022

删掉package.json 中的 “type”: "module"配置

0reactions
caoxiemeihaocommented, Aug 7, 2022

v0.8.5 将会支持 type: module

Read more comments on GitHub >

github_iconTop Results From Across the Web

Requiring electron outside of main.js causes a TypeError #7300
index.js:4 Uncaught TypeError: fs.readFileSync is not a function. I can, however, use const electron = require('electron'); in main.js.
Read more >
TypeError: window.require is not a function - Stack Overflow
require is not a function". Ironically require works only in main.js. Here the code Im trying to run: const electron = window.
Read more >
Uncaught TypeError: window.require is not a function : r/sveltejs
Greetings. I have been trying to build a web app with Svelte. However, when I try to require the fs module with window.require("fs")...
Read more >
Please am getting an error on my react electron app "TypeError
Please am getting an error on my react electron app "TypeError: fs.existsSync is not a function" below are my codes.
Read more >
Solved window.require is not a function in Electron app - AWSM
I got this error when I recently tried to upgrade my Calculator which is developed in electron few years ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found