Skip to content

TypeError: Path must be a string. Received undefined #181

@simonhaenisch

Description

@simonhaenisch

Following up on #177 (comment) (not sure whether it's related), 1.9.0 has this code:

resolve/lib/async.js

Lines 47 to 50 in 254bb40

fs.realpath(absoluteStart, function (realPathErr, realStart) {
if (realPathErr && realPathErr.code !== 'ENOENT') cb(err);
else init(realStart);
});

which throws an error if fs.realpath fails and the error is ENOENT, because then realStart is not defined.

TypeError: Path must be a string. Received undefined

This was already fixed in master in a commit prior to the release 1.9.0 (2321cd4#diff-688ede0ee2da1fa3d89f2fc485f39273), however has not yet been released.

Here is the same part with the fix on master:

resolve/lib/async.js

Lines 58 to 61 in 7c6afab

fs.realpath(absoluteStart, function (realPathErr, realStart) {
if (realPathErr && realPathErr.code !== 'ENOENT') cb(err);
else validateBasedir(realPathErr ? absoluteStart : realStart);
});

Can we get this fix out any time soon?

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