diff --git a/app/components/chat/GitCloneButton.tsx b/app/components/chat/GitCloneButton.tsx index 3fcebdc4..aa0182f6 100644 --- a/app/components/chat/GitCloneButton.tsx +++ b/app/components/chat/GitCloneButton.tsx @@ -27,7 +27,8 @@ const IGNORE_PATTERNS = [ '**/npm-debug.log*', '**/yarn-debug.log*', '**/yarn-error.log*', - '**/*lock.json', + + // Include this so npm install runs much faster '**/*lock.json', '**/*lock.yaml', ]; diff --git a/app/components/git/GitUrlImport.client.tsx b/app/components/git/GitUrlImport.client.tsx index 6053acdc..eb1bfbbe 100644 --- a/app/components/git/GitUrlImport.client.tsx +++ b/app/components/git/GitUrlImport.client.tsx @@ -31,7 +31,8 @@ const IGNORE_PATTERNS = [ '**/npm-debug.log*', '**/yarn-debug.log*', '**/yarn-error.log*', - '**/*lock.json', + + // Include this so npm install runs much faster '**/*lock.json', '**/*lock.yaml', ]; diff --git a/app/lib/webcontainer/index.ts b/app/lib/webcontainer/index.ts index 5591e396..f64b59fd 100644 --- a/app/lib/webcontainer/index.ts +++ b/app/lib/webcontainer/index.ts @@ -39,27 +39,13 @@ if (!import.meta.env.SSR) { console.log('WebContainer preview message:', message); // Handle both uncaught exceptions and unhandled promise rejections - if ( - message.type === 'PREVIEW_UNCAUGHT_EXCEPTION' || - message.type === 'PREVIEW_UNHANDLED_REJECTION' || - message.type === 'PREVIEW_CONSOLE_ERROR' - ) { + if (message.type === 'PREVIEW_UNCAUGHT_EXCEPTION' || message.type === 'PREVIEW_UNHANDLED_REJECTION') { const isPromise = message.type === 'PREVIEW_UNHANDLED_REJECTION'; - const isConsoleError = message.type === 'PREVIEW_CONSOLE_ERROR'; - const title = isPromise - ? 'Unhandled Promise Rejection' - : isConsoleError - ? 'Console Error' - : 'Uncaught Exception'; + const title = isPromise ? 'Unhandled Promise Rejection' : 'Uncaught Exception'; workbenchStore.actionAlert.set({ type: 'preview', title, - description: - 'message' in message - ? message.message - : 'args' in message && Array.isArray(message.args) && message.args.length > 0 - ? message.args[0] - : 'Unknown error', + description: 'message' in message ? message.message : 'Unknown error', content: `Error occurred at ${message.pathname}${message.search}${message.hash}\nPort: ${message.port}\n\nStack trace:\n${cleanStackTrace(message.stack || '')}`, source: 'preview', });