This repo demonstrates the issue that the path resolved from unrs-resolver
/ oxc-resolver
can contain unexpected segments
if the target module is inside a "Mounted Volume".
- Windows with NTFS support (basically, Windows XP)
- Node 20+
- Yarn (
npm install yarn
) - A partition formatted with NTFS
- Clone or download the repo into an NTFS partition.
- Create an empty folder at the path "./src/mount-root".
- Mount a Volume under this empty folder
with Disk Management. I have not tested yet but you might need to make sure there is no drive letter assigned to the same Volume.
- Create an empty file at the path "./src/mount-root/foo.ts", so it is actually created inside the mounted Volume.
- In the repo root, run the following command to restore the whole workspace
PS > yarn install
Run the following command to reproduce
PS \unrs-resolver-mounted-partition\src> yarn run start
Actual output was
Current directory: D:\test\unrs-resolver-mounted-partition\src
unrs-resolver: {
path: 'D:\\test\\unrs-resolver-mounted-partition\\src\\Volume{<G-U-I-D>}\\foo.ts',
moduleType: 'module',
packageJsonPath: 'D:\\test\\unrs-resolver-mounted-partition\\package.json'
}
oxc-resolver: {
path: 'D:\\test\\unrs-resolver-mounted-partition\\src\\Volume{<G-U-I-D>}\\foo.ts',
moduleType: 'module',
packageJsonPath: 'D:\\test\\unrs-resolver-mounted-partition\\package.json'
}
While unrs-resolver
/ oxc-resolver
can locate the foo.ts
you've just created, the Volume{<G-U-I-D>}
part is incorrect.
There is no actual folder named "Volume{<G-U-I-D>}"
under src
.
Instead, we expect something like
{
path: '...\\unrs-resolver-mounted-partition\\src\\mount-root\\foo.ts',
moduleType: 'module',
packageJsonPath: '...\\unrs-resolver-mounted-partition\\package.json'
}