probot: TypeError raised with test example from docs
Bug Report
Current Behavior
When running the example test from https://github.com/probot/probot/blob/master/docs/testing.md with my Probot app, this exception is raised:
TypeError: Cannot destructure property 'getRouter' of 'undefined' as it is undefined.
Expected behavior/code
No exception is raised.
Environment
- Probot version(s): v11.0.1
- Node/npm version: v15.4.0
- OS: macOS Catalina 10.15.7 (19H15)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (19 by maintainers)
@peey the problem that this issue was opened for has been resolved. commenting on a closed issue can easily be overlooked by maintainers, plus you are reporting a new issue even if it could fit in the description of this existing issue. the best way to get appropriate attention to this problem would be for you to open a new issue (but feel free to to link to it from this one)
Sorry for the fuss about that, no actual bug here, it was just as you suggested, i.e. values not properly read from
.envfile as expected, henceundefinedin the previous snippet.Installing https://github.com/motdotla/dotenv as dep and simply adding a
require('dotenv').config()does the trick: