madhums / madhums/node-view-helpers
Get RangeError when used with multiple mounts
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 81
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
# Error Reported
RangeError: Maximum call stack size exceeded
at RegExp.test (native)
at ServerResponse.res.render [as _render]
## Happens when I use multiple mounts.
### e.g
var app = express()
...
app.use(helper('appName))
app.use(appRouter)
### mount 1
server.use(app)
var admin = express()
//same name or different name does not matter
admin.use(helper('appName'))
//all routes fails in 'res.render()' call with above error
app.use(adminRouter)
### mount 2
server.use(admin)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the RangeError with the two mounted Express apps shown in the issue, using helper('appName') and a route that calls res.render. Trace the helper and render path while comparing the app and admin mounts. Done means the multiple-mount example renders without exceeding the call stack.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- express, javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100