Allows multiple lines for Module not found
errors (#10797)
Next is currently removing useful information from the PnP error messages. Before: ``` Module not found: Something that got detected as your top-level application (because it doesn't seem to belong to any package) tried to access a package that is not declared in your dependencies ``` After: ``` Module not found: Something that got detected as your top-level application (because it doesn't seem to belong to any package) tried to access a package that is not declared in your dependencies Required package: foo (via "foo/components/Avatar") Required by: /home/arcanis/foo/bar.tsx ```
This commit is contained in:
parent
846ec74013
commit
52fd6b1832
1 changed files with 1 additions and 0 deletions
|
@ -86,6 +86,7 @@ function formatMessage(message) {
|
|||
lines[1]
|
||||
.replace('Error: ', '')
|
||||
.replace('Module not found: Cannot find file:', 'Cannot find file:'),
|
||||
...lines.slice(2).filter((line) => line.indexOf(' @ ') !== 0),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue