-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Error: ENAMETOOLONG: name too long, unlink #396
Comments
Clean out your output directories and try again. It seems you're hitting a copy recursion loop. |
@malept thanks for the prompt reply. Please how do i clean my output directory ? Is there a command for that? I delete the tmp folders and the electron-packager folder all the time yet this error still persist. Please how do i clean my output dir.? |
I mean, remove the After you do that, perhaps you should try to utilize the |
I now changed my command to The error is now gone. However . The issue here returns http://stackoverflow.com/questions/37561851/electron-packaging-with-electron-packager . It does not pack with the node_modules . Below are the only files i see in the folder It throws the error below when i click the icon. Please how do i solve the issue ? |
I would have to look to be sure, but I believe that you're specifying an Electron version that does not define the |
@malept thanks for your time sir. Have tried many versions, though couldn't find the article about the said module version. I read somewhere people where mentioning about package.js. I check my electron-prebuilt under node_modules. Inside there is package.json and i noticed something like below.
My electron-prebuilt is "electron-prebuilt": "^1.2.1", though. I also notcied dependencies and devDependencies. I copied the dependencies under my main package.json unto my electron-prebuilt package.json. Still nothing change. My build returns 3 files on;y. None of y node_modules is compiled/built. I really am confused. |
It's Electron 0.35.0 that introduces the Don't modify the modules in |
@malept below is my project tree. Before, the electron.js you can see was inside src. I now moved it out . I can see any difference though. My electron.js is below.
I read somewhere that someone suggested adding the line below
right after |
@malept i works and packaged well for win32 .When i changed my command to It packaged everything with a whole lot bunch of folders required yet it still does not package for Darwin version |
I would avoid naming your main file What do you mean when you say it does not package for Darwin? Are you referring to your question in https://stackoverflow.com/questions/37561851/electron-packaging-with-electron-packager ? |
@malept yup. I tried platform=win32 and it package with all the necessary folders and files. Only platform=Darwin thats not working. Only darwin is failing to package with the folders. |
The folders are there, they are just not shown in Finder. In OS X (or I guess as it's now called, macOS), when a folder has the suffix
|
@malept thanks man . Really appreciate your time. You are right. 👍 |
had to explicitly set |
@malept can you comment on my logic above as to whether it might be correct and if so could this issue be re opened so you don't have to explicitly ignore this folder in order to avoid this copy recursion? |
In order to assess the problem further, it would be very helpful to have a minimal testcase to reproduce the recursion bug and test potential fixes. Using the |
@malept I forked the quick start repo and just added this one commit which adds electron packager as a dev dependency, adds the packager command as an npm script, and a docker compose file: Billy-/electron-quick-start@03ce719 |
@malept Additionally I pushed this commit to bitbucket and ran it in bitbucket pipelines, you can view the log here: https://bitbucket.org/Billy-/electron-quick-start/addon/pipelines/home#!/results/%7B3bb09238-4a1d-485a-ad53-fdcdbf02f0a8%7D |
I finally found some time to look into this. I believe the problem is because the Docker image links To avoid this problem, I suggest setting |
@malept Would it be possible to add in functionality to detect this issue and automatically prevent this from happening? It could add the temp directory in the working directory and automatically ignore it? |
I think the heuristics for that are a bit convoluted. I think I would rather see someone submit a pull request to detect if they're in a (Docker?) container, and if that is the case (and |
You'll have to forgive me as I don't know anything about how/why the temp directory is used. But I imagine if it's there it's there for a reason; what are the implications of disabling it? Additionally I think this issue has the potential to occur in any environment, if the temp directory for some reason ends up in the same directory you are copying from (this can even be explicitly set). I think the heuristic should be quite simple; in pseudo code: if (path_to_tmp_dir.indexOf(path_to_source_dir)) {
ignoreFiles += tmp_files_regex
} With this approach you don't have to worry about applying it only to one environment; it should be applied to any/all environments and it serves to prevent this issue from occurring only if it is going to occur. Correct me if I'm wrong and I'll stop wasting your time 😛 |
I also thought that pseudocode would work when I was investigating your example, except that it looks like Docker doesn't appear to do a hard link - I think it's a aufs mount or something. So it looks like a regular |
Ah, ok. Thanks for explaining. I will try to look into your suggestion. |
FWIW I managed to figure out a non-hacky solution to this problem, and it is in the 8.5.2 release. |
For over a month today, i have being battling and trying to package my app with this amazing tool. However, all my effort failed. I have asked numerous question in SO , yet no solution among which is this http://stackoverflow.com/questions/37561851/electron-packaging-with-electron-packager.
After reading some blogs and suggestions. I moved my electron.js to my home folder . Now i am having the error below
I am running electron versions
On my machine
Please i read somewhere some one was suggesting he solved his by building on his VM instead of the MAC machine. Does it really not work on MAC ? Previously, my build works for other platforms. However , it does not work for Darwin platform as you can noticed in my previous question on SO
http://stackoverflow.com/questions/37561851/electron-packaging-with-electron-packager . Someone suggested it was not building with my node_modules and i should move my electron.js to where my node_modules folder is available. Now i did moved it and i am getting the error above. Please how and what is wrong with my electron ? I have being trying this for over a month today. Any help would be appreciated.
The text was updated successfully, but these errors were encountered: