Skip to content

Commit cfbc4e7

Browse files
author
Ives van Hoorne
committed
Fix dependency errors
1 parent d374f8a commit cfbc4e7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/sandbox/errors/dependency-not-found-error.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import SandboxError from './sandbox-error';
44

55
export default class DependencyNotFoundError extends SandboxError {
66
constructor(dependencyName: string) {
7+
super();
78
const [root, second] = dependencyName.split('/');
89

910
// If the package starts with a @ it's scoped, we should add the second
1011
// part of the name in that case
1112
const parsedName = root.startsWith('@') ? `${root}/${second}` : root;
12-
const suggestions = [
13+
this.suggestions = [
1314
{
1415
title: `Add ${parsedName} as dependency`,
1516
action: () => {
@@ -18,8 +19,6 @@ export default class DependencyNotFoundError extends SandboxError {
1819
},
1920
];
2021

21-
super(suggestions);
22-
2322
this.name = 'DependencyNotFoundError';
2423
this.message = `Could not find dependency: '${parsedName}'`;
2524
}

0 commit comments

Comments
 (0)