-
-
Notifications
You must be signed in to change notification settings - Fork 34k
Closed
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.
Description
- Version: 13.2.0
- Platform: Windows
- Subsystem: modules
With a file system containing project/module.mjs, and running the Node.js REPL from within the project folder:
node
> import('./module.mjs')
gives the error -
UnhandledPromiseRejectionWarning: Error: Cannot find module C:\...\project\module.mjs imported from C:\...\project
The issue is that it is looking for the file in the directory below.
This can be resolved by treating the cwd parent path as having a trailing slash in the REPL resolver.
Metadata
Metadata
Assignees
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.