fs.readdir returns file 'dist' with 3.0.0-beta.11
See original GitHub issueIs this a BUG or a FEATURE REQUEST?: BUG
What happened:
When running fs.readdir
for a certain directory path, let’s say /example/dir
, if I run the nexe application from under that same directory path, let’s say /example/dir/testNexe
, fs.readdir
will return a dist
file that does not exist. This is the path returned by fs.readdir
:
/example/dir/testNexe/dist
What you expected to happen:
fs.readdir
should not return a file that does not exist when running the nexe app from a directory under the one passed to fs.readdir
How to reproduce it (as minimally and precisely as possible):
- Call
fs.readdir
with a path (i.e./example/dir
) in a packaged nexe application - Log result returned from
fs.readdir
- Run the nexe application from a directory under
/example/dir
(i.e./example/dir/testNexe
) /example/dir/testNexe/dist
is logged and should not.
Anything else we need to know?:
- This doesn’t happen when running the nexe application from a directory not under the directory passed to
fs.readdir
- This doesn’t happen with nexe
2.0.0-rc.34
- This is happening on both OSX Mojave and Debian 7.
Environment
- Platform(OS/Version): OSX Mojave, Debian 7
- Host Node Version: 8
- Target Node Version: 8
- Nexe version: 3.0.0-beta.11
- Python Version: 2.7.10
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:15 (9 by maintainers)
Top Results From Across the Web
fs.readdir / fs.readdirSync do not list correct files #453 - GitHub
When trying to list files in a directory with fs.readdir or fs. ... fs.readdir returns file 'dist' with 3.0.0-beta.11 nexe/nexe#571.
Read more >Node.js fs.readdir() Method - GeeksforGeeks
readdir () method is used to asynchronously read the contents of a given directory. The callback of this method returns an array of...
Read more >File system | Node.js v19.3.0 Documentation
Returns a ReadableStream that may be used to read the files data. An error will be thrown if this method is called more...
Read more >Node.js: fs.readdir does not return a file written by fs.writeFile
A simple Node.js http server which creates files in a given directory by calling POST /deploy . After the file is written, I...
Read more >npm fails to install - Google Groups
291 verbose cache add name=undefined spec="express@~3.0.6" ... fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
fs.promises.readdir
works!I tried with 3.0.5 and it produced the same results btw.