Skip to main content

All Questions

Tagged with
1 vote
0 answers
43 views

App threw an error during loadReferenceError: __dirname is not defined in ES module scope

I'm trying to build desktop app using Electron JS + React JS + Vite by using command (npm i electron-vite@latest) It works fine, now there is a need to communicate to serialport, so installed (npm i ...
Maithreyan _M's user avatar
0 votes
1 answer
31 views

when using npm only this sign is showing ⠧

when using npm only this sign is showing** ⠧ **and loads forever and always getting errors when cancelling even though I have the latest node and npm, I tried to uninstall and reinstall node and npm ...
Mohammad Ali's user avatar
0 votes
0 answers
234 views

Error executing 'npm run dist': npm ERR! code 1 with electron-builder - Problem with canvas dependencies

Here is the complete cmd output when runnning npm run dist: [email protected] dist > electron-builder • electron-builder version=24.13.3 os=10.0.22631 • loaded configuration file=...
Luca F's user avatar
  • 145
0 votes
1 answer
143 views

Is there a reason why installing any package using npm would keep giving the same error?

I have been trying to install electron for my react app but it kept on giving me this error npm ERR! code 1 npm ERR! path C:\Users\addis\Desktop\Nigerian-navy-publications\nigerian-navy-publications\...
Ishaq Abdullahi's user avatar
0 votes
0 answers
68 views

Electron npm package installtion failing on Linux OS

I am trying to install electron npm package on Linux OS server with below command but it is failing npm install electron Error as below : # npm install electron npm ERR! code 1 npm ERR! path /home/...
Lucky's user avatar
  • 369
1 vote
1 answer
935 views

React Monaco Editor trying to load URL from Local files

I'm using Monaco (@monaco-editor/react) for a code editor in a react-electron typescript application. When I simply import Editor from '@monaco-editor/react'; and then add an Editor component to React,...
crystaltine's user avatar
0 votes
0 answers
587 views

Can't install Electron on my Next.js project while running npm install on M1

Just cloned a freelancing project from GitHub and I'm trying to install npm install but I encounter this problem that I'm stuck with for days. It's about Electron. I will post the error right here and ...
Laura Cimpoesu's user avatar
0 votes
1 answer
829 views

Updating Electron app and getting error that Electron could not be found

Ok, so I'm trying to update a two year old Electron app to function. I needed to change out the syntax and remove window.require() and replace it with CreateBrowserWindow in order to get the app to ...
Brendan Ryan's user avatar
1 vote
1 answer
473 views

Electron application installed in system does not open because "iohook" library used in the "main.ts" file

I am making an application using ElectronJS and I am facing an issue. FYI: I am using electron-react-boilerplate for my application. And I use a npm library called iohook to catch all the system ...
Vrinda Goyal's user avatar
5 votes
1 answer
3k views

Electron Forge stuck on squirrel

I've been trying to package an electron app but it never goes past this stage: I've tried 3 times and every time it takes hours but doesn't finish packaging for squirrel. package.json: { "name&...
vel's user avatar
  • 149
1 vote
0 answers
449 views

fs.copySync is not a function when building react

I'm trying to package my Electron-react app but I have some issues. I use that line to compile : "electron:package:mac": "npm build && electron-builder -m -c.extraMetadata.main=...
Xam Mlr's user avatar
  • 41
5 votes
0 answers
1k views

'Can not find module: @babel/register' when 'yarn'

I'm having trouble installing yarn. This is because of the error 'Can not find module: @babel/register'. To solve this problem, I tried $npm cache verify, $npm cache clean -force and $yarn cache clean....
yang's user avatar
  • 51
1 vote
1 answer
1k views

electron with react error bin sh build command not found

I have an electron/react application which works fine in development mode, but when it comes to building and packaging it gives this error when i run yarn electron-pack $ build -mw /bin/sh: build: ...
iskandar47's user avatar
1 vote
1 answer
1k views

Npm @babel/types error in react typescript

I am getting the error below for types. I tried npm install @types/babel_types but that didn't fix it. How do I go about fixing it? I am trying to compile a react project for electron. Here is my ...
Just_Ice's user avatar
  • 553
1 vote
2 answers
5k views

How to fix Error: capacitor.config.json does not exist, did you setup capacitor in your project root? when adding electron with capacitor in ionic?

I have a ionic-react project a I'm trying to add electron support using capacitor by doing: ionic start blah tabs --type=react --capacitor npx cap add @capacitor-community/electron but it throws this ...
Ekagra Sinha's user avatar

15 30 50 per page