-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Closed
Labels
urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.
Description
This occurs with Nodejs 14.7.0 it does not occur with 12.18.3
In NPM CLI on line 14 of replace-info.js an attempt is made to construct a new URL(...)
, however URL is not a constructor.
Since upgrading Nodejs causes the problem many will consider this a NodeJS bug since the newer version is not backward compatible. I am not sure in what release of Nodejs the change was introduced.
If the bug is in NPM CLI:
One fix is to change line 1 to:
const URL = require('url').URL;
Another (possibly better) option to fix is to replace new URL
with URL.parse
.
See: npm/cli#1658
Metadata
Metadata
Assignees
Labels
urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.