Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fresch opened this issue Feb 25, 2015 · 6 comments · May be fixed by #55
Open

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

fresch opened this issue Feb 25, 2015 · 6 comments · May be fixed by #55
Labels

Comments

@fresch
Copy link

fresch commented Feb 25, 2015

[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 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

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

Installed Packages

# User
api-blueprint-preview, v0.3.0

# Dev
No dev packages
@iiiba
Copy link

iiiba commented Mar 5, 2015

workaround: just create an empty c:\tmp folder

@danielgtaylor
Copy link
Owner

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.

@thedrow
Copy link

thedrow commented Mar 11, 2016

I'm seeing this on Mac OSX as well.

evocateur pushed a commit to evocateur/atom-api-blueprint-preview that referenced this issue Apr 11, 2016
* elarivie/master:
  Set maxbuffer length to Infinity to avoid stdout maxBuffer exceeded fix danielgtaylor#44
  Removed hardcoded path to tmp, now uses os library to get it.
  Add support for embeded image with data uri
  Added missing description of response to the template
  Randomize temp file name to avoid race condition fix danielgtaylor#17 fix danielgtaylor#24 fix danielgtaylor#42
@mansona
Copy link

mansona commented Apr 12, 2016

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 #55 should probably fix this

@maurobender
Copy link

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.

@Rambou
Copy link

Rambou commented Nov 9, 2016

I confirm the same error on Ubuntu 16.04

Previewing ApiBlueprint Failed

Command failed: aglio -i /tmp/atom.apib -t /home/rambou/.atom/packages/api-blueprint-preview/templates/api-blueprint-preview.jade -n /home/rambou/Documents/api-folder -o - fs.js:640 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^ Error: ENOENT: no such file or directory, open '/home/rambou/Documents/api-folder/example-include.md' at Error (native) at Object.fs.openSync (fs.js:640:18) at Object.fs.readFileSync (fs.js:508:33) at includeReplace (/usr/lib/node_modules/aglio/lib/main.js:38:16) at RegExp.Symbol.replace at RegExp.Symbol.replace at String.replace (native) at includeDirective (/usr/lib/node_modules/aglio/lib/main.js:44:18) at Object.exports.render (/usr/lib/node_modules/aglio/lib/main.js:96:13) at render (/usr/lib/node_modules/aglio/lib/main.js:147:22)

after adding example-include.md to folder it leads to that which probably it's a Aglio-NodeJS error and has nothing to do with this plugin.

Command failed: aglio -i /tmp/atom.apib -t /home/rambou/.atom/packages/api-blueprint-preview/templates/api-blueprint-preview.jade -n /home/rambou/Documents/api-folder -o - fs.js:150 fs.Stats = function( ^ RangeError: Maximum call stack size exceeded at new fs.Stats (fs.js:150:20) at Object.fs.fstatSync (fs.js:977:18) at tryStatSync (fs.js:462:13) at Object.fs.readFileSync (fs.js:510:12) at includeReplace (/usr/lib/node_modules/aglio/lib/main.js:38:16) at RegExp.Symbol.replace at RegExp.Symbol.replace at String.replace (native) at includeDirective (/usr/lib/node_modules/aglio/lib/main.js:44:18) at includeReplace (/usr/lib/node_modules/aglio/lib/main.js:40:12)

Anyway adding example-include.md to the path folder of building fixed the problem. But this shouldn't probably happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants