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.

fails with an error "No such file or directory"

See original GitHub issue

when trying to extract all files from an .asar file I’m getting such an error.

asar extract app.asar ./app
fs.js:565
fs.write = function(fd, buffer, offset, length, position, callback) {
                                                 ^
Error: ENOENT, no such file or directory '/Users/maddev/Documents/projects/personal/slack/app.asar.unpacked/node_modules/cld-atom-shell/build/Release/cld.node'
    at Error (native)
    at Object.fs.openSync (fs.js:500:18)
    at Object.fs.readFileSync (fs.js:352:15)
    at Object.module.exports.readFileSync (/opt/local/lib/node_modules/asar/lib/disk.js:121:19)
    at Object.module.exports.extractAll (/opt/local/lib/node_modules/asar/lib/asar.js:115:24)
    at Command.<anonymous> (/opt/local/lib/node_modules/asar/bin/asar:53:15)
    at Command.listener (/opt/local/lib/node_modules/asar/node_modules/commander/index.js:249:8)
    at Command.emit (events.js:110:17)
    at Command.parseArgs (/opt/local/lib/node_modules/asar/node_modules/commander/index.js:480:12)
    at Command.parse (/opt/local/lib/node_modules/asar/node_modules/commander/index.js:372:21)

what is the problem here? thx

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

15reactions
MarshallOfSoundcommented, May 3, 2017

This issue is pretty straight forward. Basically lots of apps have an app.asar file but they also have an app.asar.unpacked folder for some files that shouldn’t live in an ASAR. This means that an ASAR file will not extract correctly unless both the app.asar.unpacked and app.asar files are in the same location.

13reactions
ashelleycommented, Jul 19, 2016

I just ran into this problem myself… I believe it is because the asar has excluded directories from the .asar package and to successfully unpack it you need to have the ‘app.asar.unpacked’ directory adjacent to the .asar file while extracting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"No such file or directory" but it exists - Stack Overflow
This error can mean that ./arm-mingw32ce-g++ doesn't exist (but it does), or that it exists and is a dynamically linked executable recognized by...
Read more >
FileNotFoundError: [Errno 2] No such file or directory
In the above code, you are not giving the full path to a file to the open() function, just its name - a...
Read more >
No such file or directory? But the file exists! - Ask Ubuntu
The file exists (e.g. file command works), making for a puzzling error message. This may mean there's a problem with the loader. Categories...
Read more >
“.h: No such file or directory" - 2 Easy fixes to Arduino error
The missing files mixup: Failing that, if you copied code from someone else check that you have the correct libraries installed. Don't see...
Read more >
Why do I get the error "chdir(...) failed: no such file or directory"?
chdir(...) failed: no such file or directoryYou are trying to execute a command remotely, where either your current working directory does not ...
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