Skip to content

nodeModulesPaths cannot resolve files that are on a networked drive from Windows #155

Closed
@NiroSugir

Description

@NiroSugir

There's a small bug in nodeModulesPaths that is removing one of the 2 prefixed backslashes when using a networked location from Windows.

The specific problem is on line 40: path.join(prefix, aPath, moduleDir);
path.join strips one of the leading backslashes, which turns '\\192.158.124.1' into '\192.158.124.1'

A fix as simple as subbing path.resolve in for path.join should work since the function is returning an absolute path (which is what path.resolve is for).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions