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

Uncaught Error: EEXIST: file already exists, mkdir 'C:\Users\jony\AppData\Local\Temp\linter-elm-make4760ZVKuSHmBWFXR\node_modules\electron\dist\resources\default_app.asar' #98

Open
AionDev opened this issue Oct 30, 2016 · 4 comments

Comments

@AionDev
Copy link

AionDev commented Oct 30, 2016

I'm using Atom 1.11.2 and Windows 10
This error _only happens when i use electron with elm_ - it doesn't happen when i use Elm alone in a project - to clarify:
This folder structure - doesn't give me any Atom errors - and the linter works fine by shows all Elm errors.
`
myProject

     -- elm-stuff
     -- elm-package.json
     -- Main.elm

`

_But the following folder structure:_
`
myProject

     -- elm-stuff
     -- node_modules  // as soon as i add the node folder my editor stops working and throws
     -- elm-package.json
     -- Main.elm
     -- other .js electron files...

`
_this error :_

Uncaught Error: EEXIST: file already exists, mkdir 'C:\Users\jony\AppData\Local\Temp\linter-elm-make4760ZVKuSHmBWFXR\node_modules\electron\dist\resources\default_app.asar'
Also, even if the Main.elm has Elm errors - it default's to No Issues green tag..

Here is an image with the error
And here, a faulty - no issues - green tag is shown

Can't be just an Electron problem either. The electron app - with no .elm - files works just fine.
It's the combination of both, that raises this issue.

_Stack trace:_
`
Error: EEXIST: file already exists, mkdir 'C:\Users\devel\AppData\Local\Temp\linter-elm-make73120CSB83KMzNIL\node_modules\electron\dist\resources\default_app.asar'
at Error (native)
at fs.mkdirSync (fs.js:842:18)
at Object.fs.mkdirSync (ELECTRON_ASAR.js:589:16)
at Object.mkdirsSync (C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:29:9)
at copySync (C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:31:36)
at C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:40:7
at Array.forEach (native)
at copySync (C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:37:14)
at C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:40:7
at Array.forEach (native)
at copySync (C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:37:14)
at C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:40:7
at Array.forEach (native)
at copySync (C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:37:14)
at C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:40:7
at Array.forEach (native)
at copySync (C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:37:14)
at C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:40:7
at Array.forEach (native)
at copySync (C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:37:14)
at C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:40:7
at Array.forEach (native)
at Object.copySync (C:\Users\devel.atom\packages\linter-elm-make\node_modules\fs-extra\lib\copy-sync\copy-sync.js:37:14)
at C:/Users/devel/.atom/packages/linter-elm-make/lib/linter-elm-make.js:468:20
at Set.forEach (native)
at C:/Users/devel/.atom/packages/linter-elm-make/lib/linter-elm-make.js:456:35
at C:/Users/devel/.atom/packages/linter-elm-make/lib/linter-elm-make.js:476:14

`
Electron & Elm - truly is the best combination I've ever seen so far, I hope this issue is not something serious and it will get fixed soon :) Tank's a lot!

@halohalospecial
Copy link
Collaborator

Hi! Can you also tell us your linter-elm-make settings, elm-package.json (specifically source-directories), and linter-elm-make.json (if existing)? Thanks!

@AionDev
Copy link
Author

AionDev commented Oct 31, 2016

Linter-elm-make Settings :

- Settings: 
   -- Lint On the Fly - checked
   -- Report Warnings - checked
   -- Log Debug Messages - checked

- Keybindings:
    -- Enable -> Escape and Enter.. = ( the default ones..)

-- all the other are not selected..

elm-package.json :

{
    "version": "1.0.0",
    "summary": "helpful summary of your project, less than 80 characters",
    "repository": "https://github.com/user/project.git",
    "license": "BSD3",
    "source-directories": [
        "."
    ],
    "exposed-modules": [],
    "dependencies": {
        "elm-lang/core": "4.0.5 <= v < 5.0.0",
        "elm-lang/html": "1.1.0 <= v < 2.0.0"
    },
    "elm-version": "0.17.1 <= v < 0.18.0"
}

linter-elm-make.json - i don't have this file

Thanks for the fast reply 👍 !

@AionDev
Copy link
Author

AionDev commented Oct 31, 2016

I found another thing that can be helpful.
The Linter works with no problem if i disable "Lint On The Fly" option..
So the problem now becomes: Lint On The Fly + Electron package (in node_modules).. i'm still in the dark but maybe you find this more on point.

Unthil this get's fixed i will use the default linting on save. Good thing I'm able to continue the project now..

@halohalospecial
Copy link
Collaborator

Hi @AIon-Gbbe, sorry for the late response.

What's happening in your case was that the library linter-elm-make is using to copy files was also looking at the files inside default_app.asar (it's an archive file https://github.com/electron/asar). I haven't dug deeper yet, but maybe the library treated the file like a directory and wanted to create a similar directory (mkdir) in the work directory.

I'm glad that you submitted this issue :-) While debugging, I noticed that non-elm files were also copied to the work directory. It should not try to copy default_app.asar in the first place 😝

Can you check if the latest version (0.17.8) resolves this? Thanks!

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

2 participants