You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Asset/EntrypointLookup.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -102,21 +102,21 @@ private function getEntriesData(): array
102
102
}
103
103
104
104
if (!file_exists($this->getEntrypointJsonPath())) {
105
-
thrownew \InvalidArgumentException(sprintf('Could not find the entrypoints file from Webpack: the file "%s" does not exist.', $this->getEntrypointJsonPath()));
105
+
thrownew \InvalidArgumentException(sprintf('Could not find the entrypoints file from Webpack: the file "%s" does not exist. Maybe you forgot to run npm/yarn build?', $this->getEntrypointJsonPath()));
thrownew \InvalidArgumentException(sprintf('There was a problem JSON decoding the "%s" file', $this->getEntrypointJsonPath()), 0, $e);
111
+
thrownew \InvalidArgumentException(sprintf('There was a problem JSON decoding the "%s" file. Try to run npm/yarn build to fix the issue.', $this->getEntrypointJsonPath()), 0, $e);
112
112
}
113
113
114
114
if (!\is_array($entriesData)) {
115
-
thrownew \InvalidArgumentException(sprintf('There was a problem JSON decoding the "%s" file', $this->getEntrypointJsonPath()));
115
+
thrownew \InvalidArgumentException(sprintf('There was a problem JSON decoding the "%s" file. Try to run npm/yarn build to fix the issue.', $this->getEntrypointJsonPath()));
116
116
}
117
117
118
118
if (!isset($entriesData['entrypoints'])) {
119
-
thrownew \InvalidArgumentException(sprintf('Could not find an "entrypoints" key in the "%s" file', $this->getEntrypointJsonPath()));
119
+
thrownew \InvalidArgumentException(sprintf('Could not find an "entrypoints" key in the "%s" file. Try to run npm/yarn build to fix the issue.', $this->getEntrypointJsonPath()));
Copy file name to clipboardExpand all lines: tests/unit/Asset/EntrypointLookupTest.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -277,25 +277,25 @@ public function invalidArgumentExceptionInGetEntriesDataDataProvider(): array
277
277
return [
278
278
[
279
279
'entrypointFilePath' => '/../fixtures/bad_json',
280
-
'expectedExceptionMessageMatches' => '/There was a problem JSON decoding the ".*\/fixtures\/bad_json\/entrypoints.json" file/',
280
+
'expectedExceptionMessageMatches' => '/There was a problem JSON decoding the ".*\/fixtures\/bad_json\/entrypoints.json" file\. Try to run npm\/yarn build to fix the issue\./',
'expectedExceptionMessageMatches' => '/Could not find an "entrypoints" key in the ".*\/fixtures\/no_entrypoint_key\/entrypoints.json" file/',
286
+
'expectedExceptionMessageMatches' => '/Could not find an "entrypoints" key in the ".*\/fixtures\/no_entrypoint_key\/entrypoints.json" file\. Try to run npm\/yarn build to fix the issue\./',
'expectedExceptionMessageMatches' => '/Could not find the entrypoints file from Webpack: the file ".*\/fixtures\/no_file\/entrypoints.json" does not exist\./',
292
+
'expectedExceptionMessageMatches' => '/Could not find the entrypoints file from Webpack: the file ".*\/fixtures\/no_file\/entrypoints.json" does not exist\. Maybe you forgot to run npm\/yarn build?/',
293
293
'expectedJson' => '',
294
294
'decodedJson' => null,
295
295
],
296
296
[
297
297
'entrypointFilePath' => '/../fixtures/bad_json',
298
-
'expectedExceptionMessageMatches' => '/There was a problem JSON decoding the ".*" file/',
298
+
'expectedExceptionMessageMatches' => '/There was a problem JSON decoding the ".*" file\. Try to run npm\/yarn build to fix the issue\./',
0 commit comments