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

Uncaught Error: ENOENT: no such file or directory, open 'C:\Users\<username>\Projects\my_project\tmp\web\elm\MyApp.elm'

Open OvermindDL1 opened this issue 9 years ago • 13 comments

  1. Opened Atom with my project.
  2. Set a Work Directory in the settings ./tmp, enabled Lint On The Fly, exited settings.
  3. Prepared self for huge file copy while Atom froze...
  4. Atom did not freeze and instead the below the happened:

Atom Version: 1.8.0 System: Microsoft Windows 10 Pro Thrown From: linter-elm-make package, v0.12.2

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open 'C:\Users\Projects\my_project\tmp\web\elm\MyApp.elm'

At fs.js:584

Error: ENOENT: no such file or directory, open 'C:\Users\<username>\Projects\my_project\tmp\web\elm\MyApp.elm'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:159:20)
    at Object.fs.writeFileSync (fs.js:1234:33)
    at C:/Users/<username>/.atom/packages/linter-elm-make/lib/linter-elm-make.js:164:20
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\<username>\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\<username>\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at C:\Users\<username>\AppData\Local\atom\app-1.8.0\resources\app.asar\src\pane-container.js:346:27
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\<username>\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\<username>\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at Pane.module.exports.Pane.setActiveItem (C:\Users\<username>\AppData\Local\atom\app-1.8.0\resources\app.asar\src\pane.js:282:22)
    at Pane.module.exports.Pane.activateItem (C:\Users\<username>\AppData\Local\atom\app-1.8.0\resources\app.asar\src\pane.js:431:21)
    at atom-tabs.TabBarView.onMouseDown (C:\Users\<username>\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:658:19)

Commands

  4x -2:17.4.0 core:delete (atom-text-editor.editor.is-focused)
     -2:14.6.0 core:save (atom-text-editor.editor.is-focused)
 14x -2:10.7.0 blur (atom-text-editor.editor.is-focused)
     -1:01.3.0 core:paste (atom-text-editor#linter-elm-make.workDirectory.editor.mini.is-focused)
  2x -0:52.8.0 editor:select-to-beginning-of-word (atom-text-editor#linter-elm-make.workDirectory.editor.mini.is-focused)
  9x -0:33.7.0 blur (atom-text-editor#linter-elm-make.workDirectory.editor.mini.is-focused)
     -0:11.9.0 core:save (atom-text-editor#linter-elm-make.workDirectory.editor.mini.is-focused)
  2x -0:10.4.0 blur (atom-text-editor#linter-elm-make.workDirectory.editor.mini.is-focused)
     -0:08.6.0 core:save (input#linter-elm-make.lintOnTheFly.)
     -0:02.9.0 blur (input#linter-elm-make.lintOnTheFly.)
     -0:02.9.0 linter:lint (atom-text-editor.editor)
     -0:02.7.0 blur (atom-text-editor.editor)

Config

{
  "core": {
    "autoHideMenuBar": true,
    "disabledPackages": [
      "autocomplete-go",
      "atom-powersnap",
      "activate-power-mode-delete",
      "autocomplete-dcd",
      "elm",
      "autocomplete-en-en",
      "spell-check",
      "latex-completions",
      "erlang-build"
    ],
    "projectHome": "C:\\Users\\<username>\\Projects",
    "themes": [
      "atom-dark-ui",
      "solarized-dark-syntax"
    ]
  },
  "linter-elm-make": {
    "alwaysCompileMain": true,
    "elmMakeExecutablePath": "C:\\Program Files (x86)\\Elm Platform\\0.17.1\\bin\\elm-make.exe",
    "lintOnTheFly": true,
    "workDirectory": "./tmp"
  }
}

Installed Packages

# User
activate-power-mode, v0.7.0
ascii-codes, v0.3.3
ascii-hex, v0.2.0
atom-autocomplete-erlang, v0.6.19
atom-beautify, v0.29.10
atom-elixir, v0.2.1
atom-formatter-jsbeautify, v1.1.2
atom-svg-icon-snippets, v0.3.3
atomic-chrome, v0.3.0
autocomplete-asciidoc, v0.1.1
autocomplete-awk, v0.1.2
autocomplete-cmake, v0.3.1
autocomplete-elixir, v1.5.14
autocomplete-emojis, v2.5.0
autocomplete-erlang, v1.1.2
autocomplete-fortran, v0.9.0
autocomplete-gdscript, v0.4.0
autocomplete-glsl, v0.2.3
autocomplete-html-entities, v0.1.0
autocomplete-js-import, v1.0.1
autocomplete-json, v5.1.0
autocomplete-mathjax, v0.1.1
autocomplete-modules, v1.5.2
autocomplete-oracle, v0.4.0
autocomplete-php, v0.3.7
autocomplete-python, v1.8.2
autocomplete-xml, v0.8.3
build-elixir, v0.6.0
build-powershell, v0.3.4
character-table, v0.4.3
clipboard-plus, v0.5.1
data-atom, v0.21.0
elixir-cmd, v0.2.9
elm-format, v2.0.1
elm-snippets, v0.1.0
emmet, v2.4.3
emoji-code, v0.3.1
erlang-autocompile, v0.1.1
es-identifier-highlight, v0.2.11
filesize, v0.4.2
fill-line, v1.0.0
fold-functions, v0.4.3
font-awesome-snippetset, v0.0.6
fonts, v1.6.0
git-checkout, v0.3.2
git-commit, v1.5.2
git-diff-details, v1.3.0
git-log, v0.4.1
go-config, v1.2.1
go-get, v1.0.3
hex, v0.6.2
highlight-bad-chars, v1.0.5
html-entitize, v1.1.0
language-asn1, v0.3.0
language-batchfile, v0.4.0
language-csv, v1.1.2
language-elixir, v0.14.0
language-elm, v1.5.0
language-elmx, v1.2.6
language-erlang, v3.0.0
language-javascript-jsx, v0.3.7
language-oracle, v1.4.1
language-pgsql, v0.2.3
language-powershell, v2.1.1
language-story, v1.2.0
language-svg, v0.9.0
linter, v1.11.14
linter-checkbashisms, v0.1.5
linter-elixir-credo, v1.1.0
linter-elm-make, v0.12.2
linter-erlang, v0.3.1
linter-erlang-dialyzer, v0.0.1
minimap, v4.24.7
minimap-bookmarks, v0.3.1
minimap-codeglance, v0.4.5
minimap-cursorline, v0.2.0
minimap-git-diff, v4.3.1
minimap-highlight-selected, v4.4.0
minimap-linter, v1.1.1
minimap-pigments, v0.2.1
minimap-selection, v4.4.0
open-no-binaries, v0.1.1
phoenix-elixir-snippets, v0.4.0
pigments, v0.31.2
project-colorize, v0.2.0
qolor, v0.2.2
react, v0.15.0
resize-indent, v0.3.0
svg-preview, v0.7.4
tabular, v0.1.0
text-manipulation, v0.6.0
tree-view-git-branch, v0.1.2
tree-view-git-status, v1.0.2

# Dev
No dev packages

OvermindDL1 avatar Jul 21 '16 16:07 OvermindDL1

Manually creating ./tmp/web/elm directories seems to have fixed it, it should probably be creating those on its own though?

OvermindDL1 avatar Jul 21 '16 16:07 OvermindDL1

Yeah, it should create the directories automatically. Can you try the latest release? Your "source-directories" idea is in there, too. Thanks!

halohalospecial avatar Jul 22 '16 13:07 halohalospecial

So I saw! Just got to work, Atom has an update for linter-elm-make, installing, restarting, ./tmp was already cleared from last night, and testing, and:

Error: ENOENT: no such file or directory, open 'C:\Users\<username>\Projects\my_server\tmp\web\elm\MessengerApp.elm'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:159:20)
    at Object.fs.writeFileSync (fs.js:1234:33)
    at Object.compileInWorkDirectory (C:/Users/<username>/.atom/packages/linter-elm-make/lib/linter-elm-make.js:584:8)
    at Object.lint (C:/Users/<username>/.atom/packages/linter-elm-make/lib/linter-elm-make.js:396:25)
    at promises.push.Promise.then._this.emitter.emit.linter (C:/Users/<username>/.atom/packages/linter/lib/linter-registry.js:63:26)
    at C:/Users/<username>/.atom/packages/linter/lib/linter-registry.js:62:23
    at Set.forEach (native)
    at LinterRegistry.lint (C:/Users/<username>/.atom/packages/linter/lib/linter-registry.js:60:18)
    at file:///C:/Users/<username>/.atom/packages/linter/lib/linter.coffee:98:16
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\<username>\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\<username>\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at C:/Users/<username>/.atom/packages/linter/lib/editor-linter.js:86:22
    at file:///C:/Users/<username>/.atom/packages/linter/lib/helpers.coffee:25:18

And the tmp directory is still entirely empty, it looks like it did not try copying the files over?

OvermindDL1 avatar Jul 22 '16 14:07 OvermindDL1

Version of linter-elm-make is listed at 0.13.1.

OvermindDL1 avatar Jul 22 '16 14:07 OvermindDL1

By "./tmp was already cleared", did you mean the entire directory was removed or just the files inside? If the tmp directory already exists, the linter will not copy the project files anymore, but will still watch the directory for changes.

There's already 0.13.2 that shows notifications when linter is copying files to the work/temporary directory and when it's finished copying. It's safer to wait for the "Copied project files to work directory" message to appear first. Mind trying that out?

Thanks!

halohalospecial avatar Jul 22 '16 15:07 halohalospecial

Ah currently our system at night has it that whenever we git commit it wipes the projects tmp directory, however the directory remains existing, just empty. If we do a fresh git clone the tmp directory will not exist at all. So in this case ./tmp/ existed, but was empty. The ./tmp directory is used for a couple of things as kind of a 'cache that should not persist' specific to this projects releasing process (so it usually remains empty anyway unless we are doing a release).

Checking for updates, found update for linter-elm-make, updating, complete, setting working directory back to ./tmp, rebooting atom, accessing one of the main files, it came up and did not freeze however it did display this at the bottom:

r
elm-make.exe: elm-lang-html-66b1583: MoveFileEx "elm-lang-html-66b1583" "elm-lang\\html\\1.1.0": permission denied (Access is denied.)at line 1 col 1 in web\elm\MyApp2.elm

Where MyApp2.elm is the elm file I had open.

OvermindDL1 avatar Jul 22 '16 17:07 OvermindDL1

Oh and no copy to tmp either

OvermindDL1 avatar Jul 22 '16 17:07 OvermindDL1

Will leaving the Work Directory blank work for you in the meantime?

halohalospecial avatar Jul 22 '16 20:07 halohalospecial

I have been yep. :-)

OvermindDL1 avatar Jul 22 '16 21:07 OvermindDL1

This happens for me either with a temporary directory or if I specify the folder... I think I will completely remove this package since it doesn't work as it should... I have also had troubles with it finding elm-make. I guess this package is not stable enough.

pablomayobre avatar Dec 03 '16 02:12 pablomayobre

Hi @Positive07, can you check if these are relevant to your issue? https://github.com/mybuddymichael/linter-elm-make/issues/100, https://github.com/mybuddymichael/linter-elm-make/issues/101. Also, can you also try leaving the Work Directory blank? Thanks!

halohalospecial avatar Dec 03 '16 23:12 halohalospecial

I left the directory black, I haven't tried entering on dev mode, I have already uninstalled the package.

I tried using elm-make from the project, elm-make globally installed and elm-make installed with npm. Nothing helped, there was always one error, either it didn't find elm-make or it couldn't copy the files.

I tried relatives. absolute and empty paths when setting the Work Directory. I have enabled and disabled Lint on the fly it doesn't work right anyway, I trigger a Lint from the command panel.

Also the issues posted here in GitHub seem to magically solve themselves and wheren't helpful at all, I would expect developers to help fixing this issues with this plugin but doesn't seem like it, everyone fixes the problem on their own and don't provide much feedback on how.

About the plugins I have, I use elmjutsu and elm-format. I have laguage-elm autocompletion disabled. I have other not Elm related plugins like build.

I wouldn't go through the hassle of removing all my plugins and installing them from zero just for the sake of debugging this. I have no experience with rebuilding plugins or modules whatever that is so I can follow the instructions you mentioned in #101

Windows 10 x64, Atom 1.13.0-beta6 ia32

pablomayobre avatar Dec 03 '16 23:12 pablomayobre

Hi, I completely understand your frustration. Issues like this, though, are trickier to debug since they usually involve user configuration (and I don't have a Windows 10 machine which makes it trickier :cry:). There are also Atom idiosyncrasies like that in https://github.com/mybuddymichael/linter-elm-make/issues/101. There's even an Elmjutsu issue before that was caused by another plugin modifying the default Atom behavior.

There seems to be 2 issues: (1) The package couldn't find elm-make (2) Uncaught Error: ENOENT: no such file or directory

For (1), you didn't mention the Elm version, but I'm assuming it's 0.18? I honestly don't know yet why some folks (using Windows) are having issues after they upgraded to 0.18 :(

For (2), you can try the following:

  • Make sure there's an elm-package.json file.
  • Delete the elm-stuff directory.
  • Disable Lint On The Fly.
  • Disable Always Compile Main.
  • Set Work Directory to blank.
  • Save the .elm file. The lint results should appear.

halohalospecial avatar Dec 05 '16 01:12 halohalospecial