-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.questionIssues that look for answers.Issues that look for answers.
Description
- Version: 4 - 10
- Platform: any?
- Subsystem: module
Compare:
> module.require(1)
AssertionError: path must be a string // Node.js v4-v6
AssertionError [ERR_ASSERTION]: path must be a string // Node.js v8-v10
VS
> require.resolve(1)
TypeError: request.substring is not a function // Node.js v4
TypeError: request.charCodeAt is not a function // Node.js v6-v10
> require.resolve.paths(1)
TypeError: request.charCodeAt is not a function // Node.js v8-v10
It seems a bit confusing error message, so maybe we need to add a type check and throw early. On the other hand, I am not sure how thoroughly we check API arguments, so maybe it is OK as it is.
Metadata
Metadata
Assignees
Labels
moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.questionIssues that look for answers.Issues that look for answers.