Skip to content

πŸŽ₯ Make videos programmatically with React

Update print-useful-error-message.ts

Jonny Burger58f0c05631bc
diff --git a/packages/renderer/src/print-useful-error-message.ts b/packages/renderer/src/print-useful-error-message.ts
index 916bbb3cb4..6d9929a689 100644
--- a/packages/renderer/src/print-useful-error-message.ts
+++ b/packages/renderer/src/print-useful-error-message.ts
@@ -12,8 +12,8 @@ export const printUsefulErrorMessage = (err: Error) => {
alreadyPrinted.push(err);
if (err.message.includes('Could not play video with')) {
- Log.info();
- Log.info(
+ console.log();
+ console.log(
'πŸ’‘ Get help for this issue at https://remotion.dev/docs/media-playback-error',
);
}
@@ -22,26 +22,28 @@ export const printUsefulErrorMessage = (err: Error) => {
err.message.includes('A delayRender()') &&
err.message.includes('was called but not cleared after')
) {
- Log.info();
- Log.info('πŸ’‘ Get help for this issue at https://remotion.dev/docs/timeout');
+ console.log();
+ console.log(
+ 'πŸ’‘ Get help for this issue at https://remotion.dev/docs/timeout',
+ );
}
if (err.message.includes('Target closed')) {
- Log.info();
- Log.info(
+ console.log();
+ console.log(
'πŸ’‘ Get help for this issue at https://remotion.dev/docs/target-closed',
);
}
if (err.message.includes('ENAMETOOLONG')) {
- Log.info();
- Log.info(
+ console.log();
+ console.log(
'πŸ’‘ Get help for this issue at https://remotion.dev/docs/enametoolong',
);
}
if (err.message.includes('Error creating WebGL context')) {
- Log.info();
+ console.log();
Log.warn(
'πŸ’‘ You might need to set the OpenGL renderer to "angle" (or "swangle" if rendering on lambda). Learn why at https://www.remotion.dev/docs/three',
);
@@ -51,15 +53,15 @@ export const printUsefulErrorMessage = (err: Error) => {
}
if (err.message.includes('The bucket does not allow ACLs')) {
- Log.info();
- Log.info(
+ console.log();
+ console.log(
'πŸ’‘ Fix for this issue: https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl',
);
}
if (err.message.includes('Minified React error #306')) {
const componentName = err.message.match(/<\w+>/)?.[0];
- Log.info(
+ console.log(
[
'πŸ’‘ This error indicates that the component',
componentName ? `(${componentName})` : null,
@@ -69,27 +71,27 @@ export const printUsefulErrorMessage = (err: Error) => {
.join(' '),
);
- Log.info();
- Log.info(
+ console.log();
+ console.log(
' Check the root file and ensure that the component is not undefined.',
);
- Log.info(
+ console.log(
' Oftentimes, this happens if the component is missing the `export` keyword',
);
- Log.info(
+ console.log(
' or if the component was renamed and the import statement not properly adjusted.',
);
}
if (err.message.includes('GLIBC_')) {
- Log.info('πŸ’‘ Remotion requires at least Libc 2.35.');
- Log.info(
+ console.log('πŸ’‘ Remotion requires at least Libc 2.35.');
+ console.log(
'πŸ’‘ Get help for this issue: https://github.com/remotion-dev/remotion/issues/2439',
);
}
if (err.message.includes('EBADF')) {
- Log.info('πŸ’‘ This error might be fixed by changing your Node version:');
- Log.info(' https://github.com/remotion-dev/remotion/issues/2452');
+ console.log('πŸ’‘ This error might be fixed by changing your Node version:');
+ console.log(' https://github.com/remotion-dev/remotion/issues/2452');
}
};