-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
TypeError: URL is not a constructor in replace-info.js #1658
Comments
Or just remove line 1: Line 1 in ad8fe71
Here Lines 14 to 15 in ad8fe71
The WHATWG |
The return from `require('url')` is not the URL constructor, that is exported as `url.URL`. The constructor is generally available as a global, so this pattern isn't 100% necessary, but this is the best way to do it based on existing patterns in npm Refs: nodejs/node#34738 Fixes: npm#1658
Thank you for the catch, we'll make the proper changes considering we still have to support Node 6 on npm v6. The fix will be shipped next week. |
Fixes: #1658 PR-URL: #1661 Credit: @aduh95 Close: #1661 Reviewed-by: @ruyadorno
Fixes: #1658 PR-URL: #1661 Credit: @aduh95 Close: #1661 Reviewed-by: @ruyadorno
Fixes: #1658 PR-URL: #1661 Credit: @aduh95 Close: #1661 Reviewed-by: @ruyadorno
This occurs with Nodejs 14.7.0
On line 14 of replace-info.js an attempt is made to construct a
new URL(...)
, however URL is not a constructor.One fix is to change line 1 to:
const URL = require('url').URL;
Another (possibly better) option to fix is to replace
new URL
withURL.parse
The text was updated successfully, but these errors were encountered: