You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Darwin f01898256a91 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
Subsystem: require.resolve
Description
I use require.resolve(request, { paths }) to find a file to load relative to a different directory, however this stopped working in node@12, where require.resolve throws Error: Cannot find module ....
Expected Behavior
The require.resolve call returns the absolute path to the requested file, according to the submitted path(s).
RomainMuller
changed the title
require.resolve does not work in node@12 as it did in previous versions
[BUG] require.resolve changed behavior in node@12, is broken
May 21, 2019
v12.1.0
Darwin f01898256a91 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
require.resolve
Description
I use
require.resolve(request, { paths })
to find a file to load relative to a different directory, however this stopped working innode@12
, whererequire.resolve
throwsError: Cannot find module ...
.Expected Behavior
The
require.resolve
call returns the absolute path to the requested file, according to the submitted path(s).Actual Behavior
In
node@12
, an error is raised.Steps to reproduce:
Result
The text was updated successfully, but these errors were encountered: