-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting source in large projects results in JavaScript heap out of memory error #2939
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
Thanks for the super simple repro! It's definitely a problem. We'll have to track down where this is coming from. As a temporary workaround you can |
This issue has been linked to a new work item: W-16096068 |
@jstvz - I found that |
I imagine this is happening in the same plugin within your CLI, but also getting the same thing with
{
"architecture": "darwin-x64",
"cliVersion": "@salesforce/cli/2.48.6",
"nodeVersion": "node-v18.20.4",
"osVersion": "Darwin 23.5.0",
"rootPath": "/Users/justinmccotter/.nvm/versions/node/v18.20.4/lib/node_modules/@salesforce/cli",
"shell": "zsh",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.1.4 (core)",
"@oclif/plugin-commands 4.0.4 (core)",
"@oclif/plugin-help 6.2.3 (core)",
"@oclif/plugin-not-found 3.2.6 (core)",
"@oclif/plugin-plugins 5.3.2 (core)",
"@oclif/plugin-search 1.2.0 (core)",
"@oclif/plugin-update 4.4.3 (core)",
"@oclif/plugin-version 2.2.4 (core)",
"@oclif/plugin-warn-if-update-available 3.1.6 (core)",
"@oclif/plugin-which 3.2.4 (core)",
"@salesforce/cli 2.48.6 (core)",
"apex 3.2.0 (core)",
"auth 3.6.27 (core)",
"data 3.5.2 (core)",
"deploy-retrieve 3.9.9 (core)",
"info 3.3.11 (core)",
"limits 3.3.15 (core)",
"marketplace 1.2.17 (core)",
"org 4.3.0 (core)",
"packaging 2.6.1 (core)",
"schema 3.3.16 (core)",
"settings 2.3.6 (core)",
"sobject 1.4.14 (core)",
"source 3.4.8 (core)",
"telemetry 3.5.1 (core)",
"templates 56.3.0 (core)",
"trust 3.7.10 (core)",
"user 3.5.17 (core)",
"@salesforce/sfdx-plugin-lwc-test 1.1.0 (user) published 302 days ago (Mon Sep 11 2023) (latest is 1.2.0)"
]
} I used the export NODE_OPTIONS to get it working and watched Node hit almost 7GB of memory which seems a bit excessive. |
On a later run, it's hitting 7.7GB. It's also taking significantly longer to run just to return no changes to deploy or only deploy a file or two. Downgrading the CLI version to make it reasonable to work with. |
@jmccotter - I found the problem and have a fix ready. I'm working on tests to prevent regressions. The bug is around multiple custom labels files within a project, particularly with 1 small file (discovered first) and 1 or more large files. The fix should go into this week's CLI release candidate. |
Summary
Converting source in large projects results in JavaScript heap out of memory error
Steps To Reproduce
git clone --depth 1 https://github.com/SalesforceFoundation/NPSP.git npsp; cd npsp
sf project convert source
Expected result
Actual result
System Information
Additional information
Attempted workaround from forcedotcom/salesforcedx-vscode#5589, but I still got heap errors on
apex 3.1.3 (user)
andapex 3.2.0 (user)
. However installing@salesforce/cli@2.36.8
worked:The text was updated successfully, but these errors were encountered: