20 of the best prompts for correcting module export changes, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.
20 of the best prompts for correcting module export changes, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.
Published June 28, 2026
Most people try to use AI for Correcting Module Export Changes with a single vague prompt and get generic results. This guide takes a different approach: 4 targeted stages, from Diagnose the Wall through Prevent Recurrence, each with a prompt that gives the AI exactly the context it needs. Lovable is altering a module's exports without updating dependent imports, causing integration failures. This results in broken functionality and wasted debugging time. These prompts help developers identify, fix, and prevent such issues efficiently. Works with ChatGPT, Claude, and Gemini.
Identify which module's exports were changed and how it affects dependent files.
Identify Changed Exports
Please provide a detailed report on the recent changes to the exports of [MODULE_NAME]. Include a comprehensive list of all functions and variables that have been altered, specifying the nature of each change (e.g., added, removed, modified). For each item, include the previous and current state, along with any relevant documentation or comments that explain the reason for the changes. Format the report in a clear, organized manner to facilitate understanding and further analysis.
List Affected Imports
Identify all files that are importing from [MODULE_NAME] in the project. For each file, provide a detailed list of the specific imports being utilized, including the import statements and the context in which they are used. Additionally, indicate if any of these imports are causing issues or conflicts within the codebase. Format the response as a structured report that includes the file names, the corresponding imports, and any relevant notes on their usage.
Check Export Consistency
Please compare the current exports of [MODULE_NAME] with the exports from its previous version. Identify and highlight any discrepancies you find, including differences in data structure, missing fields, or changes in data types. Provide a detailed report outlining each discrepancy, along with its potential impact on existing functionality. Format the findings in a clear table, including columns for the type of discrepancy, the current export value, the previous export value, and any recommended actions to resolve the issues.
Trace Import Errors
Please check for any logged errors related to imports from [MODULE_NAME]. Provide a detailed list of the error messages along with their respective locations in the code. Additionally, include any relevant context that may help in diagnosing the issues, such as the specific functions or files where the errors occur. Format the output in a clear manner, highlighting the key points for easy reference.
Review Dependency Graph
Please create a detailed dependency graph for the module named [MODULE_NAME]. Analyze the relationships between the various components and identify any broken links that may have arisen due to recent export changes. Provide a summary of the findings, including specific components that are affected, the nature of the broken links, and any recommendations for resolving these issues. Format the results in a clear and organized manner, suitable for review by the development team.
Focus on updating imports to match the new export structure.
Update Import Statements
Please review the import statements in the affected files for [MODULE_NAME] and update them to align with the new exports. List all the files that require changes, specifying the old import statements and the corresponding new ones. Additionally, provide a brief explanation of why each change is necessary and how it impacts the functionality of the code. Format your response as a detailed report with clear sections for each file.
Revert Unintended Changes
Please identify and revert any unintended changes made to the exports of [MODULE_NAME] that are causing issues. Provide a detailed summary of the changes that were made, including the specific exports affected and the reasons they are problematic. Additionally, outline the steps taken to revert these changes and ensure that the module functions correctly after the reversion. Include any potential impacts of these changes on existing functionality and suggest best practices to prevent similar issues in the future.
Synchronize Export-Import
Please review the import statements in my code and ensure they are synchronized with the current exports of [MODULE_NAME]. Identify any discrepancies or outdated references and provide a list of changes needed to update the import statements accordingly. Additionally, suggest best practices for maintaining synchronization between imports and exports in the future. Format your response as a detailed report with clear recommendations and examples.
Confirm Export Validity
Please validate the current exports of [MODULE_NAME] to ensure they are correct and intended. Provide a detailed analysis that includes any discrepancies found, explanations for why they may be incorrect, and suggestions for how to fix any issues. Additionally, outline the steps taken during the validation process and any relevant context that may affect the exports. Format your response in a clear and organized manner for easy reference.
Resolve Import Errors
Identify and resolve any import errors in the codebase related to [MODULE_NAME]. Please provide a detailed explanation of the errors found, the steps taken to fix them, and any changes made to the code. Additionally, confirm that the resolution is successful by running tests or checks to ensure that the imports are functioning correctly. Summarize the final state of the codebase and any recommendations for preventing similar issues in the future.
Ensure that the changes have resolved the import issues and the app functions correctly.
Run Import Tests
Please run comprehensive tests on all files that import from [MODULE_NAME]. Ensure that each file functions correctly without any errors. Provide a detailed report that includes the results of each test, highlighting any issues encountered, and suggest potential fixes for any failures. Additionally, summarize the overall success rate of the tests and any patterns observed in the results.
Check for Errors
Please scan the codebase for any remaining import-related errors after the recent fixes have been applied. Provide a detailed report that includes the specific files where errors are found, the nature of each error, and suggestions for resolving them. Additionally, summarize any patterns or common issues that may have contributed to these errors, and recommend best practices to avoid similar issues in the future. Format the report clearly, with sections for each file and error type.
Validate App Functionality
Please validate the functionality of the application by testing all features that rely on [MODULE_NAME]. Provide a detailed report on each feature, including whether it works as expected, any errors encountered, and suggestions for improvements if applicable. Additionally, outline the steps taken during the testing process and any specific scenarios that were tested. Include a summary of the overall application performance and any areas that may require further attention.
Confirm Dependency Integrity
Please verify the dependency graph for [MODULE_NAME] to ensure that there are no broken links present. Provide a detailed report that outlines the status of each dependency, including any that may be missing or incorrectly linked. If there are issues, specify the nature of the broken links and suggest possible resolutions. Additionally, include any relevant information about the impact of these broken links on the overall functionality of the module.
Review Build Logs
Please analyze the latest build logs for any errors related to the exports and imports of [MODULE_NAME]. Focus on identifying specific issues that may have occurred during the build process, such as missing dependencies, incorrect paths, or syntax errors. Summarize your findings in a report that includes the nature of any errors found, their potential impact on the project, and recommendations for resolving these issues. Ensure the report is clear and structured, highlighting key points for easy reference.
Create safeguards to prevent future export-import mismatches.
Draft CLAUDE.md Rule
Please draft a new rule for CLAUDE.md that ensures any changes made to exports will automatically trigger updates to imports. The rule should include specific conditions under which the updates should occur, the types of changes that will necessitate an import update, and any exceptions to this rule. Additionally, provide examples of scenarios where this rule would apply and outline the process for implementing it within the existing framework. Format the rule clearly with headings and bullet points for easy reference.
Add Code Comments
Please add detailed comments to the code in [MODULE_NAME]. Explain the export structure clearly, outlining how each component interacts with others and what dependencies are necessary for the module to function correctly. Include information about any important functions, classes, or variables, and provide context for their usage within the module. The comments should be comprehensive enough for someone unfamiliar with the code to understand its purpose and functionality.
Create Naming Convention
Propose a detailed naming convention for exports that will help minimize future mismatches with imports in a software project. The convention should include guidelines on how to structure names based on the type of data being exported, the module it belongs to, and any relevant versioning information. Additionally, provide examples of both good and bad naming practices, and explain the rationale behind the proposed structure. Aim for clarity and consistency to ensure that all team members can easily follow the convention.
Develop Checklist
Create a comprehensive checklist for reviewing export changes to ensure that all dependent imports are correctly updated. The checklist should include specific steps such as identifying all affected modules, verifying the compatibility of new exports with existing imports, and documenting any changes made. Additionally, include a section for testing to confirm that all imports function as expected after the updates. Format the checklist in a clear, organized manner with bullet points for easy reference.
Implement Project Guard
Create a project guard that monitors changes in exports and triggers an alert if any modifications occur without corresponding updates to imports. The guard should be able to track all export changes in real-time and maintain a log of alerts for review. Additionally, provide a summary report that outlines the changes made, the timestamps of the modifications, and any affected components. Ensure that the system is user-friendly and allows for easy integration into existing workflows.
Lovable may change module exports during its optimization process to improve efficiency or resolve conflicts. However, it might not automatically update dependent imports, leading to issues.
Use Lovable's version control features to track changes in module exports. Regularly review change logs and dependency graphs to stay informed.
Immediately identify the affected imports and update them to match the new export structure. Use Lovable's diagnostic tools to assist in this process.
While Lovable can suggest updates, it may not always automatically update imports. Manually verify and apply suggested changes to ensure accuracy.
Lock approved changes in your CLAUDE.md file and use Lovable's project guard features to prevent unintended reversion.
AI Prompts for Identify Export Changes Impacting Imports
The issue arises when Bolt modifies a module's exports without updating the dependent files, leading to broken imports.
See promptsAI Prompts for Prevent Module Export Conflicts
When a module's exports change without updating the importing files, it can lead to runtime errors and broken functionality.
See promptsAI Prompts for Preventing Test Breakages in Lovable
Lovable can introduce changes that break existing tests, causing frustration and wasted time.
See prompts