Error when used in overnightjs project
See original GitHub issueCaused by incorrect placing of parentheses during the isArray
check.
Modified
(Array.isArray(args[0]) && ('string' === typeof args[0][0] || args[0][0] instanceof RegExp))
Possibly relates to https://github.com/express-promise-router/express-promise-router/issues/46
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
@overnightjs/logger - npm Package Health Analysis | Snyk
Part of the OvernightJS project. ... Ensure you're using the healthiest npm packages ... @ClassErrorMiddleware decorators to use Express error handling.
Read more >Node | error middleware doesn't handle exceptions
Our back-end application is based on node and TS, and we are using overnightJS library. Unfortunately when I'm trying to create and Error...
Read more >overnightjs/logger/README.md - UNPKG
236, OvernightJS provides a Server superclass which initializes a new ExpressJS application. The express. 237, object is accessed using `this.app`, ...
Read more >@overnightjs/core NPM | npm.io
OvernightJS provides a Server superclass which initializes a new ExpressJS application. The express object is accessed using this.app , which is a protected, ......
Read more >Using Overnightjs + Sequelize in Typescript to create Nodejs ...
... you how to create Nodejs application by using using Overnightjs + Sequelize ... "test": "echo \"Error: no test specified\" && exit 1",...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That is a different issue, if you believe you’re using the library correctly I’d recommend creating a new issue.
In my instance this was caused by incorrect usage of overnightjs (potentially a bug in overnightjs itself) and possibly covered in the FAQ. I still believe this issue to be valid but cannot think of a failing test case when the library is used correctly.
When a “correct” route is defined,
args[0]
is a callback so the check forargs[0][0]
does not fail (args[callback][0] == undefined
). In the “incorrect” route example,args
is empty soargs[undefined][0] == error
.