Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fse.copy ENOENT error #224

Closed
MadMikeGamerXL1 opened this issue Mar 5, 2016 · 8 comments
Closed

fse.copy ENOENT error #224

MadMikeGamerXL1 opened this issue Mar 5, 2016 · 8 comments

Comments

@MadMikeGamerXL1
Copy link

Hi,
I've just installed the fs-extra module and every 5 minutes it tries to copy a directory, but it's failing with this error: - Error: ENOENT, lstat '/logs'
What does this mean?
It's trying to move a folder called "logs" from the same directory as the js file itself, into the '/var/www/html' folder for Apache2. Because of where the js file is, I've had to put the directory like this: '../../../var/www/html'. Is this right?

Thanks,
Mike

@ghost
Copy link

ghost commented Mar 7, 2016

@MadMikeGamerXL1 Yes. ENOENT means that the directory was not found. This is most likely because you did not specify the correct file path. ../ means go back one directory from the current working directory. You may want to look up more information regarding file paths.

@MadMikeGamerXL1
Copy link
Author

@xtrinity I am aware of what ../means. It doesn't appear to be failing with this directory, but with the logs folder which it's trying to copy.

I'm wondering, is the current working directory the main js file in regards to the fs-extra, or is it inside the fs-extra module folder?

@ghost
Copy link

ghost commented Mar 9, 2016

@MadMikeGamerXL1 The correct working directory should be from where your code is executing. So if you execute blah.someMethod() from fs-extra in /somedir/somescript.js then /somedir/ becomes your working directory.

@MadMikeGamerXL1
Copy link
Author

@xtrinity Sorry for the late response!

I thought that was the working directory. So do you have any ideas why it's not working? The folder is clearly there, and has folders inside it.
The folder it's being moved to also exists.

@chinesedfan
Copy link
Contributor

@MadMikeGamerXL1 Could you please to provide the code snippet and the main error message?

@Alnyli07
Copy link

I have same error too.

version 0.24.0 -> all of my unit tests were passed.
version 0.30.0 -> some tests were randomly failed.

I think .copySync/copy causes by removing file or files.

@RyanZim
Copy link
Collaborator

RyanZim commented Oct 26, 2016

@MadMikeGamerXL1 Could you please to provide the code snippet and the main error message?

If no response within a few days, I will close this.

@MadMikeGamerXL1
Copy link
Author

If no response within a few days, I will close this.

Sorry, I wasn't even alerted of the reply at all, that's a bit strange (even searched my emails to check, and nothing from back then). Sorry!

Anyway, I've moved on from that Javascript project, there were so many issues it just seemed easier to rewrite it in a different language (it suits better for what I needed anyway). Thanks for replying though. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants