Start a conversation

Resolving Build Failures in Altera Repository Due to Linting Error

Overview

When pushing changes to an Aurora plugin repository, the build process may fail during the linting phase with the error "Error while loading rule 'import/no-cycle': typescript with invalid interface loaded as resolver." This issue manifests in both local development environments and GitHub Actions CI pipelines, blocking plugin development and deployment. The error stems from a compatibility issue between ESLint 8.57.1, eslint-plugin-import, and the TypeScript resolver interface in the Aurora SDK's linting infrastructure.

Symptoms:
  • Build failures during the linting stage with exit code 1
  • Error message: "EslintPluginImportResolveError: Error while loading rule 'import/no-cycle': typescript with invalid interface loaded as resolver"
  • Message: "Linting failed for plugin" followed by process termination
  • Failures occur in both local npm run  build commands and GitHub Actions workflows
  • The error appears even with valid React component code that follows Aurora SDK patterns

Solution

This issue has been resolved in Aurora SDK version 25.11.2 and later. There are two approaches to fix this problem:

Recommended Solution: Upgrade to Aurora SDK version 25.11.2 or later, which includes the necessary dependency fixes.

Method 1: Upgrade Aurora SDK (Recommended)

The recommended solution is to upgrade your Aurora SDK to version 25.11.2 or later, which resolves the underlying dependency compatibility issue.

Step 1: Update Aurora SDK Version

Open your plugin repository's package.json file and update the khoros-aurora-sdk version to ~25.11.2 or later:

Step 2: Clean Existing Dependencies

Remove your existing dependency installation to ensure a clean rebuild:

rm -rf node_modules
rm package-lock.json

On Windows PowerShell:

Remove-Item -Recurse -Force node_modules
Remove-Item package-lock.json

Step 3: Install Updated Dependencies

Run a fresh installation to generate a new lockfile with the updated SDK:

npm install

This will download Aurora SDK 25.11.2+ along with its corrected dependencies, including the compatible TypeScript resolver.

Step 4: Commit Updated Files

Commit both the modified package.json and the newly generated package-lock.json to your repository:

git add package.json package-lock.json
git commit -m "Update Aurora SDK to 25.11.2 to resolve linting errors"
git push

Step 5: Verify the Build

Re-run your build locally to confirm the fix:

npm run build

Then verify that the GitHub Actions build completes successfully without linting errors.

Method 2: Temporary Workaround (If SDK Upgrade Not Possible)

If you cannot immediately upgrade to Aurora SDK 25.11.2+, you can apply a temporary workaround by adding a dependency override.

Note: This workaround is only recommended if you cannot upgrade to SDK 25.11.2+. The SDK upgrade (Method 1) is the permanent solution.

Add the following overrides section to your package.json at the root level:

"overrides": {
  "eslint-import-resolver-typescript": "3.6.3"
}

Then follow steps 2-5 from Method 1 above to clean dependencies, reinstall, commit, and verify the build.

Important: The overrides field requires npm 8.3.0 or later. If you encounter issues, ensure you're using Node.js 16.14+ or Node.js 18 LTS.

Summary

Aurora SDK plugin build failures caused by "typescript with invalid interface loaded as resolver" errors are resolved in Aurora SDK version 25.11.2 and later. The recommended solution is to upgrade your khoros-aurora-sdk package to version ~25.11.2 or higher, delete node_modules and package-lock.json, run npm install, and commit both files. If an immediate SDK upgrade is not feasible, a temporary workaround using dependency overrides for eslint-import-resolver-typescript version 3.6.3 can be applied. Both solutions require regenerating the lockfile and work for local development builds and CI/CD pipelines.

FAQ

Q1: Should I upgrade the Aurora SDK or use the override workaround?

A1: The recommended approach is to upgrade to Aurora SDK version 25.11.2 or later, as this is the permanent fix implemented by the engineering team. The dependency override workaround is only recommended if you cannot immediately upgrade your SDK version due to project constraints. If you use the override, plan to remove it once you upgrade to SDK 25.11.2+.

Q2: Why does this error occur even though my React component code is correct?

A2: The error originates in the Aurora SDK's ESLint configuration and dependency stack (specifically in SDK versions prior to 25.11.2), not in your component code. The issue is a compatibility problem between eslint-plugin-import, ESLint 8.57.1, and the TypeScript resolver interface. Even perfectly valid React components that follow Aurora patterns will trigger this error until the SDK is upgraded or the resolver is overridden.

Q3: What should I do if the build still fails after applying this fix?

A3: If the error persists after following all steps, gather diagnostic information and contact Khoros Support with the following details: 
(1) Your current Aurora SDK version from package.json
(2) Output of node -v and npm -v to confirm version compatibility, 
(3) Output of npm ls khoros-aurora-sdk eslint-import-resolver-typescript eslint-plugin-import to show the installed versions, 
(4) The complete npm debug log from the failed build (referenced in the error output as /home/runner/.npm/_logs/...debug-0.log), and 
(5) Your repository name and the specific commit where the failure occurs. This information will help support investigate any additional underlying issues.
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Ciprian Nastase

  2. Posted

Comments