Questions tagged [asar]

asar - Atom-Shell Archive Simple extensive tar-like archive format with indexing

asar - Atom-Shell Archive

Asar is a simple extensive archive format, it works like tar that concatenates all files together without compression, while having random access support.

55 questions
215
votes
2 answers

How to unpack an .asar file?

I have packed my Electron application using the following command: asar pack app app.asar Now, I need to unpack it and get the whole code back. Is there any way to do so?
Vikas Bansal
  • 10,662
  • 14
  • 58
  • 100
21
votes
1 answer

What is .asar file and why it's used in electron applications

So the question is in the title. As far as I understand, .asar is kind of archived file using in electron app. But what is the goal for it?
Ulad Melekh
  • 924
  • 3
  • 17
  • 33
9
votes
1 answer

How should i exclude all node_modules in electron-packager

I'm using electron-packager for creating an electron.exe of my app. I need to exclude all node modules . I tried the following --ignore=node_modules The above is not working. Any idea how to exclude all folders/ remove node modules in final build.
arun thatham
  • 500
  • 1
  • 4
  • 13
8
votes
1 answer

How to serve static files from an asar archive

I am trying to build an electron app with a server component using express for remote control. The express module initializes with var staticPath = path.resolve('app/assets') setupNotifications(server); app.use(cors()); app.use('/api/',…
Peter Tillemans
  • 34,983
  • 11
  • 83
  • 114
6
votes
1 answer

Using require when electron app is packaged in an asar

In my main.js, I have: var mainFrm = require('./MainFrm'); This works fine except when the application is packaged as an asar file. I get a 'Cannot find module' error. The documentation states to use the…
Brandon F
  • 703
  • 1
  • 5
  • 10
5
votes
1 answer

How to fix " --asar does not take any arguments, it only has sub-properties" warning

At the last step of my application when I want to build my desktop app (for windows 10 OS) with "npm run package-win" command I am getting the same warning in the title. Other problem is application's exe file occurs but gives error. "The code…
Osman19702
  • 77
  • 1
  • 3
  • 7
5
votes
0 answers

ASAR Limitations on Node API: spawn a child process

I’m currently developing an electron app that has, at some point, to convert an HTML file into a PDF file. For this purpose, I use the native node module html-pdf which is based on phantomjs. It works well when the application is not packed but…
user108828
  • 1,822
  • 1
  • 14
  • 21
4
votes
1 answer

How to modify the folder structure of app.asar when using electron-builder?

I am using create-react-app (CRA) to create and build my frontend code. My (simplified) folder structure looks like this: package.json node_modules/ public/ └── electron.js └── index.html src/ My npm scripts: "build": { "appId":…
Kerim Güney
  • 1,059
  • 1
  • 10
  • 23
4
votes
3 answers

PNG files not found in ASAR

I have an Electron (1.7.10) application that is reporting it can't find 5 of 7 PNG files in my ASAR. All 7 PNGs are in the same folder, and 2 of them are displayed on screen fine. The other 5 report net::ERR_FILE_NOT_FOUND. All src attributes for…
TimTheEnchanter
  • 3,370
  • 1
  • 26
  • 47
4
votes
0 answers

Electron putting node_modules in asar fails module dependencies

I've got an Electron project in node.js and am currently attempting to make distribution easier by collapsing the massive node_modules hierarchy into an asar. This way I can have app.asar and modules.asar, as suggested by various places such as…
Dave
  • 141
  • 1
  • 9
4
votes
1 answer

Node JS unable to execute asar archive

Pretty simple. I am on Windows 8, I used the asar module to package a folder containing a node app. I ran node app.asar and got the error SyntaxError: Unexpected token ILLEGAL at exports.runInThisContext (vm.js:53:16) "(function (exports, require,…
Daniel Olivier
  • 183
  • 2
  • 10
3
votes
0 answers

Electron app doesnt launch after modefing app.asar on macOS

So l am trying to modify an electron application. Firstly, I extracted app.asar into a folder then modefed an html file and launched the program. And it worked, my html was applyed to this application. Later then I tried to make the same thing on…
СТЁПА
  • 31
  • 3
3
votes
2 answers

electron-builder installer: A JavaScript error occurred in the main process, Error: The specified module could not be found

I am using electron 11.1.0 and electron-builder 22.10.5 I created a installer for my electron app which is using native module using electron-builder and its working fine on my laptop but on my friends laptop I am getting error A JavaScript error…
Alok
  • 7,734
  • 8
  • 55
  • 100
3
votes
0 answers

Electron fails to find react module on its installed dependencies

My app works fine in npm run dev &/or yarn run build && yarn start But packaged version fails to find dependencies of dependencies, specifically 'react' within react-player or react-countup. Uncaught Error: Cannot find module 'react' Require…
Aid19801
  • 1,175
  • 1
  • 17
  • 30
3
votes
0 answers

Can I access Electron's HTML/CSS via app.asar?

I'm testing a desktop app being built in Electron. Since the app’s layout is CSS/HTML based, I was hoping to do simple layout modifications without access to the source material. Even if I can't see my mods in the running app, it would be useful to…
bjornte
  • 749
  • 1
  • 9
  • 31
1
2 3 4