Common Build Pipeline Errors
Issue: "npm install" Failing with Exit Code 137
If your build pipeline is encountering issues during the npm install
step, resulting in the following error:
Error: Process completed with exit code 137.
Cause of the Error
This error typically occurs when the build server runs out of memory during the installation process. When this happens, the system terminates the process to prevent further issues, leading to a failed build.
Identifying the Problem
One common cause of this memory issue is a circular dependency in your package.json
files. Specifically, you should check for the following line in both your server/package.json
and client/package.json
:
"BE-SMIT-B-11": "file:..",
This line may have been added unintentionally by your development environment. It creates a circular dependency where the package references itself, causing npm install
to consume more and more memory until the build fails.
Resolution Steps
Open
package.json
Files:- Navigate to your project’s
server/package.json
andclient/package.json
files.
- Navigate to your project’s
Locate the Circular Dependency:
Look for the following line:
"BE-SMIT-B-11": "file:..",
Remove the Problematic Line:
- If you find this line, remove it from both
package.json
files.
- If you find this line, remove it from both
Re-run the Pipeline:
- After making these changes, commit and push your updates, then trigger the build pipeline again.
Expected Outcome
With the circular dependency removed, the npm install
step should now complete successfully, resolving the memory issue and preventing the build from failing.
Conclusion
Removing unintended circular dependencies is a simple yet effective way to prevent out-of-memory errors in your build pipeline. Always review your package.json
files for any unusual or unintended entries to ensure a smooth build process.
By following these steps, you should no longer encounter the Error: Process completed with exit code 137
during the npm install
step. Happy building!