Open fresch opened 9 years ago
workaround: just create an empty c:\tmp folder
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.
I'm seeing this on Mac OSX as well.
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/danielgtaylor/atom-api-blueprint-preview/pull/55 should probably fix this
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.
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.
[Enter steps to reproduce below:]
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'
Commands
Config
Installed Packages