y-takey / atom-mermaid

Preview mermaid on atom editor
MIT License
42 stars 7 forks source link

Uncaught TypeError: path must be a string or Buffer #56

Closed aar0nr closed 5 years ago

aar0nr commented 5 years ago

[Enter steps to reproduce:]

  1. Create a diagram
  2. Right click -> "Save As PNG"
  3. Click "Cancel"

Atom: 1.34.0 x64 Electron: 2.0.16 OS: Mac OS X 10.13.6 Thrown From: atom-mermaid package 3.3.1

Stack Trace

Uncaught TypeError: path must be a string or Buffer

At fs.js:646

TypeError: path must be a string or Buffer
    at Object.fs.openSync (fs.js:646:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:166:20)
    at Object.fs.writeFileSync (fs.js:1303:33)
    at Proxy.writeFileSync (/packages/atom-mermaid/node_modules/fs-plus/lib/fs-plus.js:292:17)
    at MermaidView.module.exports.MermaidView.MermaidView.writeFile (/packages/atom-mermaid/lib/mermaid-view.coffee:202:10)
    at /packages/atom-mermaid/lib/mermaid-view.coffee:196:10)

Commands

     -3:17.7.0 snippets:expand (input.hidden-input)
     -3:17.7.0 editor:indent (input.hidden-input)
     -3:17.3.0 snippets:next-tab-stop (input.hidden-input)
     -3:17.3.0 snippets:expand (input.hidden-input)
     -3:17.3.0 editor:indent (input.hidden-input)
     -3:16.7.0 snippets:next-tab-stop (input.hidden-input)
     -3:16.7.0 snippets:expand (input.hidden-input)
     -3:16.7.0 editor:indent (input.hidden-input)
     -3:15.1.0 snippets:next-tab-stop (input.hidden-input)
     -3:15.1.0 snippets:expand (input.hidden-input)
     -3:15.1.0 editor:indent (input.hidden-input)
     -3:14.4.0 snippets:next-tab-stop (input.hidden-input)
     -3:14.4.0 snippets:expand (input.hidden-input)
     -3:14.4.0 editor:indent (input.hidden-input)
  9x -0:47.1.0 core:backspace (input.hidden-input)
  3x -0:32.7.0 atom-mermaid:save-as-png (div.)

Non-Core Packages

atom-mermaid 3.3.1 
busy-signal 2.0.0 
highlight-selected 0.14.0 
intentions 1.1.5 
language-ejs 0.4.0 
linter 2.3.0 
linter-eslint 8.5.0 
linter-rubocop 2.2.3 
linter-sass-lint 1.9.0 
linter-ui-default 1.7.1 
toggle-quotes 1.1.3 
zentabs 0.8.9 
y-takey commented 5 years ago

Hi @aar0nr , thank you for the issue :) I've fixed this bug, and publish newer version.