Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Uncaught Error: ENOENT, no such file or directory '/Users/ars/0.atom/packages/atom-beautify/' #416

Closed

Description

@arsent

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.188.0
System: Mac OS X 10.10.2
Thrown From: tree-view package, v0.168.0

Stack Trace

Uncaught Error: ENOENT, no such file or directory '/Users/ars/0.atom/packages/atom-beautify/'

At fs.js:503

Error: ENOENT, no such file or directory '/Users/ars/0.atom/packages/atom-beautify/'
  at Error (native)
  at Object.fs.openSync (fs.js:503:18)
  at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:118:20)
  at Object.fs.writeFileSync (fs.js:1116:15)
  at Object.fsPlus.writeFileSync (/Users/ars/Downloads/Atom.app/Contents/Resources/app/node_modules/fs-plus/lib/fs-plus.js:246:17)
  at TreeView.module.exports.TreeView.pasteEntries (/Users/ars/Downloads/Atom.app/Contents/Resources/app/node_modules/tree-view/lib/tree-view.js:965:32)
  at space-pen-div.atom.commands.add.tree-view:paste (/Users/ars/Downloads/Atom.app/Contents/Resources/app/node_modules/tree-view/lib/tree-view.js:277:26)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Users/ars/Downloads/Atom.app/Contents/Resources/app/src/command-registry.js:242:29)
  at /Users/ars/Downloads/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Users/ars/Downloads/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Users/ars/Downloads/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Users/ars/Downloads/Atom.app/Contents/Resources/app/src/window-event-handler.js:180:20)

Commands

     -7:24.2 window:update-available (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-light-syntax.theme-atom-light-ui)
  3x -3:47.0 core:move-left (atom-text-editor.editor.mini)
     -3:44.9 editor:move-to-end-of-screen-line (atom-text-editor.editor.mini)
     -3:29.7 core:cancel (atom-text-editor.editor.mini)
     -0:56.6 core:move-right (atom-text-editor.editor)
     -0:55.3 core:save (atom-text-editor.editor)
     -0:38.3 core:move-left (atom-text-editor.editor)
     -0:37.5 core:backspace (atom-text-editor.editor)
     -0:36.8 core:save (atom-text-editor.editor)
  2x -0:08.8 core:undo (atom-text-editor.editor)
     -0:07.7 core:save (atom-text-editor.editor)
     -0:03.5 tree-view:copy (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:01.2 tree-view:paste (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)

Config

{
  "core": {
    "themes": [
      "atom-light-ui",
      "atom-light-syntax"
    ],
    "disabledPackages": [
      "jshint"
    ]
  }
}

Installed Packages

# User
Remote-FTP, v0.6.2
atom-beautify, v0.23.1
atom-django, v0.2.1
dash, v1.1.0
linter-php, v0.0.12
linter-phpcs, v0.0.12
php-getters-setters, v0.3.0
react, v0.10.1

# Dev
No dev packages

Activity

  1. kevinsawicki commented on Apr 28, 2015

    @kevinsawicki
    Contributor

    @izuzak any ideas on this one? I would have thought this was fixed by #371

  2. izuzak commented on Apr 29, 2015

    @izuzak
    Contributor

    @izuzak any ideas on this one? I would have thought this was fixed by #371

    @kevinsawicki Hmmmm, that's interesting. Looking again at #371, it only prevents problems where the source item is removed (e.g. you copy an item, delete it and try to paste it), but it doesn't handle any possible problems related to the the destination.

    The stack trace above indicates that things failed when Tree View tried to write to the destination:

      at Object.fs.writeFileSync (fs.js:1116:15)
      at Object.fsPlus.writeFileSync (/Users/ars/Downloads/Atom.app/Contents/Resources/app/node_modules/fs-plus/lib/fs-plus.js:246:17)
    

    Looking at the code around that writeFileSync call, I'd guess that reading the source file succeeded, but writing it to the destination didn't succeed. I'm not sure why that would happen, though :(. As far as I can tell, writeFileSync will create the necessary directory structure when writing files.

    Also, it's interesting that the exception message says that the destination location which caused the problem was this:

    Uncaught Error: ENOENT, no such file or directory '/Users/ars/0.atom/packages/atom-beautify/'

    I'm not sure how such a destination location could be created, but I'm probably missing something here. It doesn't seem to be a folder (the writeFileSync call should never be called for a folder, it should be called only for files -- folders are pasted with copySync). And it doesn't seem to be a file because it's not possible to have empty filenames.

    😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions