linter-elm-make icon indicating copy to clipboard operation
linter-elm-make copied to clipboard

Uncaught Error: ENOENT: no such file or directory, open '/var/folders/09/5zhm6xjx5gq135ncsk2kld18...

Open mrpinsky opened this issue 7 years ago • 4 comments

  1. Remove elm-package.json from Elm sub-project
  2. Restart Atom
  3. Reopen Elm file

Atom: 1.14.3 x64 Electron: 1.3.13 OS: Mac OS X 10.11.6 Thrown From: linter-elm-make package 0.22.5

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open '/var/folders/09/5zhm6xjx5gq135ncsk2kld180000gp/T/linter-elm-make6752357rbyETe0xd8/src/elm/modules/App.elm'

At fs.js:640

Error: ENOENT: no such file or directory, open '/var/folders/09/5zhm6xjx5gq135ncsk2kld180000gp/T/linter-elm-make6752357rbyETe0xd8/src/elm/modules/App.elm'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:168:20)
    at Object.fs.writeFileSync (fs.js:1343:33)
    at /packages/linter-elm-make/lib/linter-elm-make.js:140:20
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at TextEditor.module.exports.TextEditor.destroyed (/app.asar/src/text-editor.js:551:20)
    at TextEditor.module.exports.Model.destroy (/app.asar/src/model.js:31:58)
    at Pane.module.exports.Pane.destroyItem (/app.asar/src/pane.js:660:18)
    at TabBarView.module.exports.TabBarView.closeTab (/app.asar/node_modules/tabs/lib/tab-bar-view.js:333:26)
    at HTMLDivElement.TabView.didClickCloseIcon (/app.asar/node_modules/tabs/lib/tab-bar-view.js:222:19)

Commands

     -0:36 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-monokai.theme-one-dark-ui)
     -0:17.6.0 linter:lint (atom-text-editor.editor)

Non-Core Packages

atom-handlebars 1.3.0 
atom-solarized-dark-ui 0.28.0 
atom-typescript 10.1.14 
autoclose-html 0.23.0 
color-picker 2.2.5 
elm-format 2.1.0 
file-icons 2.0.15 
highlight-selected 0.12.0 
language-elm 1.5.0 
language-html-angular 1.0.16 
language-javascript-jsx 0.3.7 
less-than-slash 0.16.0 
line-ending-converter 1.3.2 
linter 1.11.23 
linter-csslint 1.3.4 
linter-elm-make 0.22.5 
linter-eslint 8.1.2 
linter-htmlhint 1.3.2 
linter-sass-lint 1.7.4 
merge-conflicts 1.4.4 
minimap 4.26.8 
monokai 0.22.0 
solarized-light-ui 0.1.0 

mrpinsky avatar Feb 24 '17 22:02 mrpinsky

Hi @mrpinsky! I was not able to reproduce the error :-( Can you provide a sample project that I can test? Thanks!

halohalospecial avatar Feb 27 '17 11:02 halohalospecial

Also, did putting back the elm-package.json file fix it?

halohalospecial avatar Feb 27 '17 11:02 halohalospecial

Hmm...I cloned my project, reproduced the error, got rid of extraneous files for sharing, and couldn't reproduce it anymore. I can now move elm-package.json around as much as I want, and it handles everything fine.

In the original project, I kept elm-package.json at the top level of the project, then set the linter's working directory and my source-directories to src/elm (where all the Elm files were already), and that solved all the issues I was having. No more dealing with temp files.

Thanks for your work on this!

mrpinsky avatar Feb 27 '17 18:02 mrpinsky

Hi! The package will only create temp files if Work Directory is not set and Lint On The Fly is checked. I'm guessing you have Lint On The Fly checked since temp files were being created. I would only recommend setting Work Directory if you have a big enough project to minimize the time it takes the package to copy the files.

halohalospecial avatar Feb 28 '17 02:02 halohalospecial