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.

Getting a `ENOENT: no such file or directory`

See original GitHub issue

I’m decompressing a folder of files, I’m attempting to write them to dist folder but getting a ENOENT: no such file or directory error. Is this the normal behavior? If so, how does this library handle decompressing something like this?

https://stackoverflow.com/questions/54640595/when-decompressing-zip-in-node-enoent-no-such-file-or-directory

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

2reactions
hubgitcommented, Jun 5, 2020

I got an ENOENT: no such file or directory error when file.type was set to file rather than directory for an entry named images/ (possibly because the entry didn’t have the appropriate external attributes).

This workaround has been successful:

await decompress(zip, dir, {
  map: (file) => {
    if (file.type === 'file' && file.path.endsWith('/')) {
      file.type = 'directory'
    }
    return file
  },
})
1reaction
bilwitcommented, Nov 18, 2019

I was getting this and the originating error syscall was “link” and after looking on here it appears it doesn’t handle symlinks well. The workaround is to use the filter option. https://github.com/kevva/decompress/issues/52

decompress(inputpath, outputpath, { "filter": file => { if (file.type !== "link") { return true; } return false; } }) .then(files => { ... })

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - ENOENT, no such file or directory - Stack Overflow
First try npm install ,if the issue is not yet fixed try the following one after the other. · npm cache clean ,then...
Read more >
ENOENT: no such file or directory · Issue #1171 - GitHub
After updating from 6.3.0 to 6.4.1 I've got errors. node:internal/process/promises:246 triggerUncaughtException(err, true /* fromPromise */) ...
Read more >
ENOENT: no such file or directory - Power Platform Community
I get the error: C:\Users\nuno_\Documents\NumberButtonSelector>npm run build npm ... verbose stack Error: ENOENT: no such file or directory, ...
Read more >
ENOENT No Such File or Directory Open - YouTube
In This Video We Will See How to Fix npm ERR Code ENOENT npm ERR syscall Open Error or ENOENT No Such File...
Read more >
ENOENT: no such file or directory ... but there is - Reddit
I'm having an issue similar to this person's (but it's hard to tell because they deleted their post). ... The error message I...
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