mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
Run CommonJS resolver only if `error.code` is ERR_MODULE_NOT_FOUND. Avoid using absolute paths in hint by: * using a parent-relative path if the specifier is a relative path * using a `pkg/x.js` format if the specifier is bare (e.g. `pkg/x`) PR-URL: https://github.com/nodejs/node/pull/31906 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
6 lines
91 B
JavaScript
6 lines
91 B
JavaScript
'use strict';
|
|
|
|
import obj from 'some_module/obj';
|
|
|
|
throw new Error('Should have errored');
|