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

Documentation fails to build when using this theme #6

Open
twiertzema opened this issue Jun 22, 2017 · 1 comment
Open

Documentation fails to build when using this theme #6

twiertzema opened this issue Jun 22, 2017 · 1 comment

Comments

@twiertzema
Copy link

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.

@giorgiobeggiora
Copy link

giorgiobeggiora commented Nov 17, 2017

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

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

No branches or pull requests

2 participants