Engineering
nango-esm-migration avatar

nango-esm-migration

Fixes CJS/ESM module compatibility issues in Nango integrations after zero-yaml migration, including path adjustments, ESM wrappers, and restoring original implementations.

Introduction

This skill provides a systematic approach for resolving build and runtime module errors that occur when migrating Nango integrations to an ESM-based zero-yaml architecture. It is designed for developers who encounter integration failures post-migration, specifically addressing issues where legacy CommonJS (CJS) vendor modules clash with modern ESM requirements.

  • Resolves 'Could not resolve' and 'Cannot find module' build errors related to vendor directory paths.
  • Provides instructions for creating ESM wrappers to expose CJS-only vendor modules for modern ESM consumption.
  • Guides developers in identifying and cleaning up 'temporary' code workarounds, such as hardcoded currency math or commented-out imports, that were introduced during unstable migration phases.
  • Includes a specialized investigation checklist using git history and local filesystem inspection to trace back original, functional code implementation.
  • Offers standard path resolution patterns for vendor files located within nango-integrations directories to ensure consistent module resolution.

When using this skill, perform a preliminary check of your build environment using 'npx nango compile' and 'npx tsc --noEmit' to verify module resolution. Focus on identifying underscored parameters or hardcoded workarounds that indicate legacy patches. Ensure all vendor imports include the mandatory .js extension for ESM compatibility. This process is essential for maintaining the integrity and precision of your Nango integration logic, especially when dealing with currency conversion or complex vendor library dependencies.

Repository Stats

Stars
1
Forks
1
Open Issues
0
Language
Not provided
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 07:14 PM
View on GitHub