-
-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Due to the npm bug, wrong version of glob may be installed. For example, if add glob 7 in devDependencies, it will cause ENOTDIR invalid cwd error.
It's better to warn exceptions friendly in following codes. Or users will be confused for some error like TypeError: Invalid Version: undefined.
var modulePath, modulePackage;
try {
var delim = (process.platform === 'win32' ? ';' : ':'),
paths = (process.env.NODE_PATH ? process.env.NODE_PATH.split(delim) : []);
modulePath = resolve.sync(this.moduleName, {basedir: configBase || cwd, paths: paths});
modulePackage = silentRequire(fileSearch('package.json', [modulePath]));
} catch (e) {}
Metadata
Metadata
Assignees
Labels
No labels