Skip to content

Commit 6de280d

Browse files
add error message around mistmatched auto versions
1 parent bfb712b commit 6de280d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/cli/src/run.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env node
22

3+
/* eslint-disable complexity */
4+
35
import Auto, {
46
ApiOptions,
57
IInfoOptions,
@@ -116,6 +118,19 @@ export async function run(command: string, args: ApiOptions) {
116118
`);
117119
console.log("");
118120
auto.logger.verbose.error(error);
121+
} else if (error.message.includes("TypeError: Cannot read property 'tap")) {
122+
auto.logger.log.error(endent`
123+
One of the plugins you're using calls an unknown hook!
124+
125+
This usually because your project is trying to use mismatched plugin + core version.
126+
127+
To fix this do one of the following:
128+
129+
1. Ensure that you have the same version of auto and it's plugins installed
130+
2. Ensure that any non-official plugins use the same version of @auto-it/core
131+
3. Ensure your environment's version of auto matches the plugins you're using
132+
`);
133+
auto.logger.log.error(error);
119134
} else if (!(error instanceof LabelExistsError)) {
120135
console.log(error);
121136
}

0 commit comments

Comments
 (0)