mirror of https://github.com/status-im/metro.git
[Packager] Fix when loading a path that can't be handled
Summary: [Packager] Adds `NotFoundError` when loading a path that can't be handled Resolves https://github.com/facebook/react-native/issues/1944 Closes https://github.com/facebook/react-native/pull/1948 Github Author: Dave Sibiski <dsibiski@gmail.com>
This commit is contained in:
parent
01d07a3eb6
commit
f7d51c750f
|
@ -150,7 +150,16 @@ class DependencyGraph {
|
|||
|
||||
getOrderedDependencies(entryPath) {
|
||||
return this.load().then(() => {
|
||||
const absolutePath = path.resolve(this._getAbsolutePath(entryPath));
|
||||
const absPath = this._getAbsolutePath(entryPath);
|
||||
|
||||
if (absPath == null) {
|
||||
throw new NotFoundError(
|
||||
'Could not find source file at %s',
|
||||
entryPath
|
||||
);
|
||||
}
|
||||
|
||||
const absolutePath = path.resolve(absPath);
|
||||
|
||||
if (absolutePath == null) {
|
||||
throw new NotFoundError(
|
||||
|
|
Loading…
Reference in New Issue