Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks
kkdev163 opened this issue Apr 11, 2024 · 0 comments · Fixed by #1809
Closed
3 tasks
Assignees
Labels

Comments

@kkdev163
Copy link

kkdev163 commented Apr 11, 2024

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)

url = new URL(url).toString();

Expected behavior

Code to reproduce

Checklist

  • I have searched through GitHub issues for similar issues.
  • I have completely read through the README and documentation.
  • I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
@kkdev163 kkdev163 added the bug label Apr 11, 2024
@kkdev163 kkdev163 changed the title [fix] Version 2.15.2 introduced the URL object, which is not compatible with Node versions below 10. [fix] Version 2.x introduced the URL object, which is not compatible with Node versions below 10. Apr 11, 2024
@fengmk2 fengmk2 self-assigned this Apr 11, 2024
fengmk2 added a commit that referenced this issue Apr 11, 2024
fengmk2 added a commit that referenced this issue Apr 11, 2024
@fengmk2 fengmk2 linked a pull request Apr 11, 2024 that will close this issue
@fengmk2 fengmk2 closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants