opened
fresch
username_0
[Enter steps to reproduce below:]

1. install atom
2. npm install -g aglio
3. apm install api-blueprint-preview
4. start atom
5. ctrl+shif+a / packages -> api blueprint -> toggle preview

System:
Win 7 pro 64bit
nodejs 0.10.36 x86
npm 2.6.0
Visual Studio 2010 Express
Windows SDK for Windows 7 (7.1)
Visual C++ Redistributable (x86) – 10.0.30139
atom 0.182.0 20.2.2015 18:52:34


**Atom Version**: 0.182.0
**Thrown From**: [api-blueprint-preview](https://github.com/username_2/atom-api-blueprint-preview) package, v0.3.0

### Stack Trace

Uncaught Error: ENOENT, no such file or directory 'C:\tmp\atom.apib'

```
At C:\Users\asdf\AppData\Local\atom\app-0.182.0\resources\app\node_modules\q\q.js:128

Error: ENOENT, no such file or directory 'C:\tmp\atom.apib'
    at Error (native)
    at Object.fs.openSync (fs.js:503:18)
    at Object.module.(anonymous function) [as openSync] (C:\Users\asdf\AppData\Local\atom\app-0.182.0\resources\atom\common\lib\asar.js:422:20)
    at Object.fs.writeFileSync (fs.js:1116:15)
    at ApiBlueprintPreviewView.module.exports.ApiBlueprintPreviewView.renderApiBlueprintText (C:\Users\asdf\.atom\packages\api-blueprint-preview\lib\api-blueprint-preview-view.coffee:149:10)
    at ApiBlueprintPreviewView.module.exports.ApiBlueprintPreviewView.renderApiBlueprint (C:\Users\asdf\.atom\packages\api-blueprint-preview\lib\api-blueprint-preview-view.coffee:143:21)
    at C:\Users\asdf\.atom\packages\api-blueprint-preview\lib\api-blueprint-preview.coffee:63:35
    at _fulfilled (C:\Users\asdf\AppData\Local\atom\app-0.182.0\resources\app\node_modules\q\q.js:794:54)
    at self.promiseDispatch.done (C:\Users\asdf\AppData\Local\atom\app-0.182.0\resources\app\node_modules\q\q.js:823:30)
    at Promise.promise.promiseDispatch (C:\Users\asdf\AppData\Local\atom\app-0.182.0\resources\app\node_modules\q\q.js:756:13)
```

### Commands

```
     -0:13.2 api-blueprint-preview:toggle (atom-text-editor.editor)
```

### Config

```json
{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  }
}
```

### Installed Packages

```coffee
# User
api-blueprint-preview, v0.3.0

# Dev
No dev packages
```
Uncaught Error: ENOENT, no such file or directory 'C:\tmp\atom.apib'
issue
created
iiiba
username_1
workaround: just create an empty c:\tmp folder
comment
created
danielgtaylor
username_2
This should be fixable by doing a check to see if the directory exists, and if not then creating it. Pull requests welcome, otherwise I'll get the fix in when I can.
comment
created
thedrow
username_3
I'm seeing this on Mac OSX as well.
comment
created
mansona
username_4
I'm seeing this on Mac OSX too, It seems to work the first time but then it stop working. I had a look and it seems like `/tmp/atom.apib` gets deleted. If I touch `/tmp/atom.apib` it works once more and then it breaks next time I change the source file. 

I would imagine this is a race condition so https://github.com/username_2/atom-api-blueprint-preview/pull/55 should probably fix this
comment
created
maurobender
username_5
I can confirm this on Mac OSX too. It switches between preview and error every time I change the file and it's really annoying.
comment
created
Rambou
username_6
comment