Question

I'm having trouble running Docco on Windows 7. I did the following:

  1. downloaded and installed python and perl
  2. installed node js
  3. Run npm install -g coffee-script
  4. Run easy_install pygments
  5. Run npm install -g pygments
  6. Run npm install -g docco

I navigated to the directory with javascript source:

C:\javascript>docco animation.js
docco: animation.js -> docs\animation.html

fs.js:427
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory 'C:\javascript\docs\animation.html'
    at Object.fs.openSync (fs.js:427:18)
    at Object.fs.writeFileSync (fs.js:966:15)
    at write (C:\Users\myaccount\AppData\Roaming\npm\node_modules\docco\docco.js:111:15)
    at C:\Users\myaccount\AppData\Roaming\npm\node_modules\docco\docco.js:29:11

    at fs.js:266:14
    at Object.oncomplete (fs.js:107:15)

Any idea what the problem is?

Was it helpful?

Solution

Looking at the Docco sources, this is the problem:

ensureDirectory = function(dir, callback) {
  return exec("mkdir -p " + dir, function() {
    return callback();
  });
};

In other words: it assumes that an executable called mkdir exists, and uses it to creates the necessary directories (including the output directory). But mkdir is a Unix-ism, and (usually) not available on Windows. So it fails (and since Docco isn't checking for any errors, it happily continues as if nothing happened...).

EDIT: seems these issues were fixed recently, so if you use the Github-hosted version of Docco you might get it to work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top