documentation-theme-light icon indicating copy to clipboard operation
documentation-theme-light copied to clipboard

Documentation fails to build when using this theme

Open twiertzema opened this issue 8 years ago • 1 comments

I pulled down this project as a zip and placed it at the root of my project. Then, based on what I could piece together from the documentation and reading between the lines, I have tried using this theme with the following Node script:

#!/usr/bin/node

const documentation = require('documentation');
const streamArray = require('stream-array');
const vfs = require('vinyl-fs');

documentation.build(['src/**'], {})
    .then(res => documentation.formats.html(res, { theme: 'documentation-theme-light-master' }))
    .then(output => streamArray(output).pipe(vfs.dest('./docs')));

The relevant file structure is as follows:

node_modules/..
src/..
scripts/build-documentation.js (the above script)
documentation-theme-light-master/..
package.json

When I run documentation in this project, I receive the following error:

(node:18329) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: require(...) is not a function
(node:18329) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The result is that the documentation fails to build and there is no output.

twiertzema avatar Jun 22 '17 21:06 twiertzema

when i build, it fails, then my terminal says:

TypeError: require(...) is not a function
    at <my project path>/node_modules/documentation/lib/output/html.js:35:30

giorgiobeggiora avatar Nov 17 '17 11:11 giorgiobeggiora