Stack trace not available in development mode


In my .env file I set NODE_ENV to development but adonisjs always returns 1 line of error and there is no stack trace for errors

How can I fix this ?


hello @Ali-Azmoud can you show the error from adonis ?


sure, here is what I get. an example


I want adonis display errors like this image


Does your app have its own global exception handler ?


If you mean there is a directory inside app named Exceptions , Yes

and inside of it there is a file named Handler.js which contains this script:

'use strict'

const BaseExceptionHandler = use('BaseExceptionHandler')

class ExceptionHandler extends BaseExceptionHandler {

  async handle (error, { request, response }) {
  async report (error, { request }) {

module.exports = ExceptionHandler

and something else ( not related to this question ), is there any chance to have wantsJson() function in the next version of adonisjs


well, thank you, I removed Exceptions directory and its working as expected.

// this line was behind of my problem ! :grinning: