emmetio / emmet-atom

Emmet support for Atom
MIT License
765 stars 180 forks source link

Uncaught Error: ENOENT: no such file or directory, open '' #284

Open dtomasch opened 9 years ago

dtomasch commented 9 years ago

[Enter steps to reproduce below:]

Trying to update image size…

Atom Version: 0.211.0 System: Mac OS X 10.10.3 Thrown From: emmet package, v2.3.10

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open ''

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:745

Error: ENOENT: no such file or directory, open ''
  at Error (native)
  at Object.fs.openSync (fs.js:544:18)
  at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:118:20)
  at Object.fs.readFileSync (fs.js:396:15)
  at Object.fs.readFileSync (ATOM_SHELL_ASAR.js:369:29)
  at Function.utils.extend._read (/Users/dtomasch/.atom/packages/emmet/node_modules/emmet/lib/plugin/file.js:103:24)
  at Function.utils.extend.read (/Users/dtomasch/.atom/packages/emmet/node_modules/emmet/lib/plugin/file.js:115:9)
  at getImageSizeForSource (/Users/dtomasch/.atom/packages/emmet/node_modules/emmet/lib/action/updateImageSize.js:95:9)
  at updateImageSizeHTML (/Users/dtomasch/.atom/packages/emmet/node_modules/emmet/lib/action/updateImageSize.js:31:4)
  at Object.updateImageSizeAction (/Users/dtomasch/.atom/packages/emmet/node_modules/emmet/lib/action/updateImageSize.js:113:5)
  at Object.run (/Users/dtomasch/.atom/packages/emmet/node_modules/emmet/lib/action/main.js:150:21)
  at Object.run (/Users/dtomasch/.atom/packages/emmet/node_modules/emmet/lib/emmet.js:81:23)
  at runAction (/Users/dtomasch/.atom/packages/emmet/lib/emmet.coffee:91:9)
  at /Users/dtomasch/.atom/packages/emmet/lib/emmet.coffee:59:9
  at Object.module.exports.exec (/Users/dtomasch/.atom/packages/emmet/lib/editor-proxy.coffee:80:10)
  at /Users/dtomasch/.atom/packages/emmet/lib/emmet.coffee:58:19
  at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:740:18)
  at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1152:26)
  at atom-text-editor.<anonymous> (/Users/dtomasch/.atom/packages/emmet/lib/emmet.coffee:57:24)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)
  at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:156:19)
  at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:70:30)
  at emitOne (events.js:77:13)
  at EventEmitter.emit (events.js:166:7)

Commands

     -0:00.9.0 emmet:update-image-size (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "language-c",
      "language-clojure",
      "language-coffee-script",
      "language-csharp",
      "language-gfm",
      "language-git",
      "language-go",
      "language-java",
      "language-make",
      "language-mustache",
      "language-objective-c",
      "language-perl",
      "language-property-list",
      "language-python",
      "language-ruby",
      "language-ruby-on-rails",
      "language-less",
      "language-shellscript",
      "language-sql",
      "language-todo",
      "language-toml",
      "language-yaml",
      "markdown-preview",
      "release-notes",
      "close-tags",
      "php-class-tree",
      "linter-php",
      "php-cs-fixer",
      "dash",
      "disable-keybindings",
      "tag"
    ],
    "themes": [
      "spacegray-dark-ui",
      "spacegray-dark-syntax"
    ]
  },
  "emmet": {}
}

Installed Packages

# User
autocomplete-php, v0.3.6
color-picker, v2.0.7
emmet, v2.3.10
linter, v1.0.4
minimap, v4.10.0
pigments, v0.8.0
spacegray-dark-syntax, v0.2.0
spacegray-dark-ui, v0.12.0

# Dev
No dev packages

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/22976531-uncaught-error-enoent-no-such-file-or-directory-open?utm_campaign=plugin&utm_content=tracker%2F535900&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F535900&utm_medium=issues&utm_source=github).
sergeche commented 9 years ago

Most likely it’s because Emmet cannot find image file. Can you provide a code snippet?

hignatious commented 9 years ago

Whenever I try to use ctrl-/ to comment out several lines in Python, I get this error.

Doesn't happen in other langugaes.

Troush commented 9 years ago

Get this error with Ruby

pieplu commented 8 years ago

Same error when I try to comment my javascript width ctrl-/

andymost commented 8 years ago

With *.ini files too

joseluisq commented 8 years ago

:+1:

cristian-sima commented 8 years ago

+1

cristian-sima commented 8 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.7.3 System: Microsoft Windows 10 Pro Thrown From: emmet package, v2.4.3

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open ''

At C:\Users\Cristian\AppData\Local\atom\app-1.7.3\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:833

Error: ENOENT: no such file or directory, open ''
    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.readFileSync (fs.js:431:33)
    at Object.fs.readFileSync (ATOM_SHELL_ASAR.js:427:29)
    at Function.utils.extend._read (C:\Users\Cristian\.atom\packages\emmet\node_modules\emmet\lib\plugin\file.js:103:24)
    at Function.utils.extend.read (C:\Users\Cristian\.atom\packages\emmet\node_modules\emmet\lib\plugin\file.js:115:9)
    at encodeToBase64 (C:\Users\Cristian\.atom\packages\emmet\node_modules\emmet\lib\action\base64.js:53:8)
    at Object.encodeDecodeDataUrlAction (C:\Users\Cristian\.atom\packages\emmet\node_modules\emmet\lib\action\base64.js:131:13)
    at Object.run (C:\Users\Cristian\.atom\packages\emmet\node_modules\emmet\lib\action\main.js:150:21)
    at Object.run (C:\Users\Cristian\.atom\packages\emmet\node_modules\emmet\lib\emmet.js:81:23)
    at runAction (file:///C:/Users/Cristian/.atom/packages/emmet/lib/emmet.coffee:94:9)
    at file:///C:/Users/Cristian/.atom/packages/emmet/lib/emmet.coffee:62:9
    at Object.module.exports.exec (file:///C:/Users/Cristian/.atom/packages/emmet/lib/editor-proxy.coffee:80:10)
    at file:///C:/Users/Cristian/.atom/packages/emmet/lib/emmet.coffee:61:19
    at TextBuffer.module.exports.TextBuffer.transact (C:\Users\Cristian\AppData\Local\atom\app-1.7.3\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:828:18)
    at TextEditor.module.exports.TextEditor.transact (C:\Users\Cristian\AppData\Local\atom\app-1.7.3\resources\app.asar\src\text-editor.js:1274:26)
    at atom-text-editor.<anonymous> (file:///C:/Users/Cristian/.atom/packages/emmet/lib/emmet.coffee:60:24)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Cristian\AppData\Local\atom\app-1.7.3\resources\app.asar\src\command-registry.js:260:29)
    at C:\Users\Cristian\AppData\Local\atom\app-1.7.3\resources\app.asar\src\command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\Cristian\AppData\Local\atom\app-1.7.3\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\Cristian\AppData\Local\atom\app-1.7.3\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (C:\Users\Cristian\AppData\Local\atom\app-1.7.3\resources\app.asar\src\window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (C:\Users\Cristian\AppData\Local\atom\app-1.7.3\resources\app.asar\src\window-event-handler.js:3:61)

Commands

  2x -2:30.7.0 core:backspace (atom-text-editor.editor.is-focused)
     -2:28.7.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused.autocomplete-active)
  5x -2:16.8.0 core:undo (atom-text-editor.editor.is-focused)
     -1:50.8.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
     -1:50.8.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:50.7.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
     -1:50.7.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:50.5.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
     -1:50.5.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:50.3.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
     -1:50.3.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:40.7.0 core:backspace (atom-text-editor.editor.is-focused)
  3x -1:39.6.0 core:delete (atom-text-editor.editor.is-focused)
  2x -0:31.5.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:07.5.0 emmet:encode-decode-data-url (atom-text-editor.editor.is-focused)
     -0:06.9.0 editor:toggle-line-comments (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "autoHideMenuBar": true,
    "disabledPackages": [
      "spell-check",
      "language-csharp",
      "language-c",
      "language-ruby",
      "language-python",
      "language-ruby-on-rails",
      "atom-minify",
      "linter-jshint",
      "environment",
      "css-clean"
    ],
    "packagesWithKeymapsDisabled": [
      "spell-check",
      "markdown-preview-plus",
      "atom-minify",
      "highlight-line",
      "tree-view",
      "linter",
      "linter-sass-lint"
    ],
    "themes": [
      "atom-light-ui",
      "one-light-syntax"
    ]
  }
}

Installed Packages

# User
auto-indent, v0.5.0
autocomplete-go, v1.0.8
builder-go, v1.0.0
docblockr, v0.7.3
emmet, v2.4.3
file-icons, v1.7.8
go-config, v1.1.4
go-get, v1.0.3
go-plus, v4.1.0
gofmt, v1.1.6
gometalinter-linter, v1.1.0
gorename, v1.0.2
highlight-selected, v0.11.2
language-babel, v2.18.5
linter, v1.11.4
linter-csslint, v1.3.2
linter-sass-lint, v1.4.2
markdown-preview-plus, v2.4.0
navigator-godef, v1.0.3
pigments, v0.26.0
source-preview-babel, v0.1.1
tester-go, v1.0.4

# Dev
No dev packages
ragmha commented 8 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.4.3 System: Linux Mint Thrown From: emmet package, v2.4.3

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open ''

At /usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:810

Error: ENOENT: no such file or directory, open ''
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:137:20)
    at Object.fs.readFileSync (fs.js:397:15)
    at Object.fs.readFileSync (ATOM_SHELL_ASAR.js:385:29)
    at Function.utils.extend._read (/home/rgb/.atom/packages/emmet/node_modules/emmet/lib/plugin/file.js:103:24)
    at Function.utils.extend.read (/home/rgb/.atom/packages/emmet/node_modules/emmet/lib/plugin/file.js:115:9)
    at encodeToBase64 (/home/rgb/.atom/packages/emmet/node_modules/emmet/lib/action/base64.js:53:8)
    at Object.encodeDecodeDataUrlAction (/home/rgb/.atom/packages/emmet/node_modules/emmet/lib/action/base64.js:131:13)
    at Object.run (/home/rgb/.atom/packages/emmet/node_modules/emmet/lib/action/main.js:150:21)
    at Object.run (/home/rgb/.atom/packages/emmet/node_modules/emmet/lib/emmet.js:81:23)
    at runAction (/home/rgb/.atom/packages/emmet/lib/emmet.coffee:94:9)
    at /home/rgb/.atom/packages/emmet/lib/emmet.coffee:62:9
    at Object.module.exports.exec (/home/rgb/.atom/packages/emmet/lib/editor-proxy.coffee:80:10)
    at /home/rgb/.atom/packages/emmet/lib/emmet.coffee:61:19
    at TextBuffer.module.exports.TextBuffer.transact (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:805:18)
    at TextEditor.module.exports.TextEditor.transact (/usr/share/atom/resources/app.asar/src/text-editor.js:1216:26)
    at atom-text-editor.<anonymous> (/home/rgb/.atom/packages/emmet/lib/emmet.coffee:60:24)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:260:29)
    at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -1:28.8.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.seti-ui-no-icons.theme-firewatch-syntax.theme-one-light-ui)
     -0:39.2.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:36 core:move-down (atom-text-editor.editor.is-focused)
     -0:34.4.0 core:save (atom-text-editor.editor.is-focused)
     -0:33.7.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:32.3.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:21.3.0 core:backspace (atom-text-editor.editor.is-focused)
  2x -0:20.6.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:16.1.0 editor:move-to-beginning-of-word (atom-text-editor.editor.is-focused)
  3x -0:15.3.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:14.4.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:14 core:move-left (atom-text-editor.editor.is-focused)
  2x -0:12.9.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:12.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:11.8.0 core:save (atom-text-editor.editor.is-focused)
     -0:05.8.0 emmet:encode-decode-data-url (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "customFileTypes": {
      "source.ini": [
        ".buckconfig",
        ".flowconfig"
      ],
      "source.json": [
        ".arcconfig",
        "BUCK.autodeps"
      ],
      "source.python": [
        "BUCK"
      ]
    },
    "themes": [
      "one-light-ui",
      "firewatch-syntax"
    ]
  }
}

Installed Packages

# User
browser-plus, v0.0.60
color-picker, v2.1.1
emmet, v2.4.3
file-icons, v1.7.11
firewatch-syntax, v1.0.1
flex-tool-bar, v0.10.0
jsformat, v0.9.3
language-babel, v2.20.8
language-javascript-jsx, v0.3.7
linter, v1.11.4
linter-eslint, v7.2.2
linter-flow, v5.1.0
linter-gcc, v0.6.14
merge-conflicts, v1.4.2
minimap, v4.23.5
minimap-find-and-replace, v4.5.1
pigments, v0.26.2
react, v0.15.0
react-es6-snippets, v0.3.0
react-snippets, v0.4.2
sync-settings, v0.7.2
terminal-plus, v0.14.5
tool-bar, v0.4.0
tool-bar-almighty, v0.6.1
wakatime, v5.0.8
webbox-color, v0.5.9

# Dev
No dev packages
redfellow commented 8 years ago

emmet:encode-decode-data-url has taken over the default keybind to toggle comments (at least that's the case for me on Ubuntu 16.04).

Manually replacing the keybind works.