编程语言
首页 > 编程语言> > javascript – 早午餐设置LOGGY_STACKS = true

javascript – 早午餐设置LOGGY_STACKS = true

作者:互联网

我正在开发一个早午餐的应用程序.我是新手,并追踪错误,我必须启用LOGGY_STACKS = true.我该如何设置?

Stack trace was suppressed. Run with `LOGGY_STACKS=true` to see the trace.

解决方法:

如果您不热衷于“永久”修改系统环境变量并影响其他基于Brunch的项目,则可以在package.json中的NPM脚本定义中使用set命令,然后使用&&组合器和早午餐命令.

这种技术应该适用于Unix和Windows机器.

// example package.json
{
  "scripts": {
    "start": "set LOGGY_STACKS=true && brunch watch --server",
    "serve": "npm run start",
    "build": "brunch b -p --env production",
    "clean": "rm -rf public dist"
  }
}

作为参考,我使用start和stop来覆盖我的基础,因为并非所有基于NPM的服务都使用相同的初始化任务名称.

标签:javascript,node-js,testing,error-handling,brunch
来源: https://codeday.me/bug/20190623/1268759.html