Skip to content
Pretty error reporting for Node.js 🚀 (Modified for Nuxt.js & SSR Bundles)
Branch: develop
Clone or download
Pull request Compare This branch is 38 commits ahead, 33 commits behind poppinss:develop.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
test
.editorconfig
.gitignore
.npmignore
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
README.md
appveyor.yml
package-lock.json
package.json
yarn.lock

README.md

Youch!

Pretty error reporting for Node.js 🚀 (Modified for Nuxt.js & SSR Bundles)





NPM Version Build Status Downloads Stats Appveyor

Gitter Channel Trello Patreon

Youch is inspired by Whoops but with a modern design. Reading stack trace of the console slows you down from active development. Instead Youch print those errors in structured HTML to the browser.

Features

  1. HTML reporter
  2. JSON reporter, if request accepts a json instead of text/html.
  3. Sorted frames of error stack.

Installation

npm i --save @nuxtjs/youch

Basic Usage

Youch is used by AdonisJs and Nuxt.js, but it can be used by express or raw HTTP server as well.

const Youch = require('@nuxtjs/youch')
const http = require('http')

http.createServer(function (req, res) {

  // PERFORM SOME ACTION
  if (error) {
    const youch = new Youch(error, req)

    youch
    .toHTML()
    .then((html) => {
      res.writeHead(200, {'content-type': 'text/html'})
      res.write(html)
      res.end()
    })
  }

}).listen(8000)

Release History

Checkout CHANGELOG.md file for release history.

Meta

Checkout LICENSE.txt for license information Harminder Virk (Aman) - https://github.com/thetutlage

You can’t perform that action at this time.