griffin-stewie / asciidoctor-preview

Show a HTML preview for the AsciiDoc content by Asciidoctor in the Atom Editor
https://atom.io/packages/asciidoctor-preview
MIT License
6 stars 0 forks source link

Uncaught Error: ENOENT: no such file or directory, open '/var/folders/cs/s04c8lpn62bgf8j09wjnfbcr... #40

Open gardenias opened 6 years ago

gardenias commented 6 years ago

[Enter steps to reproduce:]

  1. set commnad asciidoctor {{{filePath}}}
  2. press ctrl-alt-o preview the file

Atom: 1.24.0-beta3 x64 Electron: 1.6.15 OS: Mac OS X 10.13.1 Thrown From: asciidoctor-preview package 0.3.2

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open '/var/folders/cs/s04c8lpn62bgf8j09wjnfbcr0000gn/T/asciidoctor118029-51043-ha36rt.hxkh8v9529/temp.html'

At fs.js:558

Error: ENOENT: no such file or directory, open '/var/folders/cs/s04c8lpn62bgf8j09wjnfbcr0000gn/T/asciidoctor118029-51043-ha36rt.hxkh8v9529/temp.html'
    at Object.fs.openSync (fs.js:558:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:173:20)
    at Object.fs.readFileSync (fs.js:468:33)
    at Object.fs.readFileSync (ELECTRON_ASAR.js:506:29)
    at /packages/asciidoctor-preview/lib/renderer.coffee:90:17
    at ChildProcess.exithandler (child_process.js:214:7)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:885:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:501:12)

Commands

     -5:52.4.0 core:close (div.asciidoctor-preview.native-key-bindings)
  5x -5:20.8.0 core:save (input.hidden-input)
     -3:52.1.0 settings-view:open (input.hidden-input)
     -3:49.8.0 core:close (div.panels-item)
     -3:48.6.0 settings-view:open (input.hidden-input)
  3x -3:39 core:backspace (input.hidden-input)
     -3:27.2.0 asciidoctor-preview:toggle (input.hidden-input)
     -3:26.9.0 datatip:toggle (input.hidden-input)
  3x -3:15.3.0 core:copy (div.asciidoctor-preview.native-key-bindings)
     -0:32.8.0 editor:select-to-end-of-line (input.hidden-input)
 14x -0:32.2.0 core:select-left (input.hidden-input)
     -0:23.3.0 core:backspace (input.hidden-input)
     -0:19 core:save (div.package-detail.panels-item)
     -0:16.4.0 intentions:highlight (input.hidden-input)
  2x -0:16.2.0 asciidoctor-preview:toggle (input.hidden-input)
     -0:15.1.0 datatip:toggle (input.hidden-input)

Non-Core Packages

ascii-art 1.2.0 
asciidoc-assistant 0.2.2 
asciidoc-image-helper 1.0.0 
asciidoc-preview 2.10.3 
asciidoc-reference-check 0.1.0 
asciidoctor-preview 0.3.2 
atom-ide-ui 0.7.1 
atom-typescript 12.0.0 
autocomplete-asciidoc 0.1.2 
busy-signal 1.4.3 
color-picker 2.2.5 
column-select 1.0.1 
file-icons 2.1.16 
format-sql 0.3.0 
highlight-selected 0.13.1 
ide-java 0.7.0 
ide-json 0.1.0 
ide-typescript 0.7.2 
intentions 1.1.5 
intentions-colorpicker 1.0.1 
jumpy 4.2.0 
language-asciidoc 1.11.0 
language-kotlin 0.5.0 
language-plantuml 0.2.0 
language-restructuredtext 1.1.0 
language-scala 1.1.9 
linter 2.2.0 
linter-javac 1.9.4 
linter-kotlin 0.6.0 
linter-scalac 1.4.4 
linter-shellcheck 1.4.6 
linter-tidy 2.3.1 
linter-ui-default 1.6.10 
minimap 4.29.7 
minimap-highlight-selected 4.6.1 
minimap-linter 2.1.3 
plantuml-viewer 0.7.2 
project-manager 3.3.5 
rst-preview 1.3.1 
rst-preview-pandoc 0.1.12 
scala-format 0.1.8 
Sublime-Style-Column-Selection 1.7.4 
toggler 0.3.1 
1602 commented 6 years ago

I'm having the same issue after installing asciidoctor-diagram (not sure if related though).

griffin-stewie commented 6 years ago

I tried this sample adoc file, but not reproduced.

Maybe command you set is wrong. asciidoctor located in your $PATH. other toolchains as well like asciidoctor-diagram. I set values PATH in this plugin's settings page /Users/stewie/.rbenv/versions/2.3.1/bin:/Users/stewie/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0:/usr/local/bin

screenshot

Atom: 1.23.3 x64 OS: Mac OS X 10.13.3 plugin: asciidoctor-preview package 0.3.2

1602 commented 6 years ago

It was a default command, removing -r asciidoctor-diagram solved issue for me.

But of course it introduced other issue - diagrams not rendered in preview, I don't really care, but perhaps something still should be fixed. BTW, command containing asciidoctor-diagram running in terminal works fine.