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

Can't use HTML in @example, getting node error "UnhandledPromiseRejectionWarning" #273

Closed
sodevious opened this issue Mar 20, 2018 · 2 comments
Assignees
Labels

Comments

@sodevious
Copy link

sodevious commented Mar 20, 2018

Steps to reproduce using example repo/code https://github.com/sodevious/herman-html-bug:

  • git clone https://github.com/sodevious/herman-html-bug.git
  • npm install sassdoc sassdoc-theme-herman -g
  • sassdoc scss

You should get the following error.

➜  herman-example git:(master) ✗ sassdoc scss
(node:15263) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'customHTML' of undefined
    at module.exports (/usr/local/lib/node_modules/sassdoc-theme-herman/lib/renderIframe.js:66:41)
    at Promise.all.then (/usr/local/lib/node_modules/sassdoc-theme-herman/lib/annotations/example.js:99:13)
    at tryCatcher (/usr/local/lib/node_modules/sassdoc-theme-herman/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/sassdoc-theme-herman/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/usr/local/lib/node_modules/sassdoc-theme-herman/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromiseCtx (/usr/local/lib/node_modules/sassdoc-theme-herman/node_modules/bluebird/js/release/promise.js:606:10)
    at Async._drainQueue (/usr/local/lib/node_modules/sassdoc-theme-herman/node_modules/bluebird/js/release/async.js:138:12)
    at Async._drainQueues (/usr/local/lib/node_modules/sassdoc-theme-herman/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/sassdoc-theme-herman/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:773:18)
    at tryOnImmediate (timers.js:734:5)
    at processImmediate [as _immediateCallback] (timers.js:711:5)
(node:15263) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15263) [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.
@sodevious
Copy link
Author

https://github.com/sodevious/herman-html-bug/blob/master/scss/main.scss

Bug goes away if the @example is removed.

@mirisuzanne
Copy link
Member

Hi @sodevious 👋- thanks for filing this. We'll take a look asap!

jgerigmeyer added a commit that referenced this issue Mar 28, 2018
* master:
  Upgrade deps (notably webpack4).
  Include dist/ in repo so that package can be run from repo.
  Fix bug if annotations try to access missing `env.herman` [fixes #273]
  Fix bug displaying tabs in `<code>` blocks [fixes #271]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants