koajs / koa

Expressive middleware for node.js using ES2017 async functions
https://koajs.com
MIT License
35.07k stars 3.22k forks source link

[fix] Version 2.x introduced the URL object, which is not compatible with Node versions below 10. #1808

Closed kkdev163 closed 4 months ago

kkdev163 commented 4 months ago

Describe the bug

Node.js version: 8.11.2

OS version:

Description:

Actual behavior

2024-04-11 14:25:48,740[v2][music-puzzle-admin][music-puzzle-admin][195926][traceId][spanId][uid][0:0][ERROR][mug] - [-/10.200.xxx.xxx/-/58ms GET /puzzle/tag/module/48] nodejs.ReferenceError: URL is not defined

    at Object.redirect (/home/appops/music-puzzle-admin/music-puzzle-admin_online/default/approot/node_modules/koa/lib/response.js:266:7)

https://github.com/koajs/koa/blob/ddbff3031696746d4674b6d8625a99f91338e792/lib/response.js#L266

Expected behavior

Code to reproduce

Checklist