Skip to content

Commit 590f459

Browse files
committed
Show error instead of throw when package.json not found
Partially fixes codesandbox#753
1 parent ca0b901 commit 590f459

File tree

1 file changed

+4
-0
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies

1 file changed

+4
-0
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ import { ErrorMessage } from './elements';
1616
function Dependencies({ signals, store }) {
1717
const sandbox = store.editor.currentSandbox;
1818

19+
if (!store.editor.parsedConfigurations.package) {
20+
return <ErrorMessage>Unable to find package.json</ErrorMessage>;
21+
}
22+
1923
const { parsed, error } = store.editor.parsedConfigurations.package;
2024

2125
if (error) {

0 commit comments

Comments
 (0)