Description
server/middleware/rateLimiter.js declares passwordAttemptLimiter twice using export const, causing a SyntaxError: Identifier 'passwordAttemptLimiter' has already been declared crash on server startup.
Error
SyntaxError: Identifier 'passwordAttemptLimiter' has already been declared
at compileSourceTextModule (node:internal/modules/esm/utils:346:16)
File
server/middleware/rateLimiter.js
Lines
- Line 45:
export const passwordAttemptLimiter = rateLimit({...})
- Line 57:
export const passwordAttemptLimiter = rateLimit({...})
Expected Behaviour
Server should start without errors.
Description
server/middleware/rateLimiter.jsdeclarespasswordAttemptLimitertwice usingexport const, causing aSyntaxError: Identifier 'passwordAttemptLimiter' has already been declaredcrash on server startup.Error
SyntaxError: Identifier 'passwordAttemptLimiter' has already been declared
at compileSourceTextModule (node:internal/modules/esm/utils:346:16)
File
server/middleware/rateLimiter.jsLines
export const passwordAttemptLimiter = rateLimit({...})export const passwordAttemptLimiter = rateLimit({...})Expected Behaviour
Server should start without errors.