{"id":13536868,"url":"https://github.com/endel/increase-memory-limit","last_synced_at":"2025-04-13T02:12:15.597Z","repository":{"id":48582608,"uuid":"83663284","full_name":"endel/increase-memory-limit","owner":"endel","description":"Increase memory limit for local node binaries (\"max-old-space-size\")","archived":false,"fork":false,"pushed_at":"2022-07-05T04:05:19.000Z","size":15,"stargazers_count":268,"open_issues_count":11,"forks_count":26,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-07T04:34:06.445Z","etag":null,"topics":["node","workaround"],"latest_commit_sha":null,"homepage":"http://npmjs.com/package/increase-memory-limit","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/endel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-02T10:03:01.000Z","updated_at":"2025-02-05T02:35:30.000Z","dependencies_parsed_at":"2022-08-30T08:51:35.817Z","dependency_job_id":null,"html_url":"https://github.com/endel/increase-memory-limit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endel%2Fincrease-memory-limit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endel%2Fincrease-memory-limit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endel%2Fincrease-memory-limit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endel%2Fincrease-memory-limit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/endel","download_url":"https://codeload.github.com/endel/increase-memory-limit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654089,"owners_count":21140236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["node","workaround"],"created_at":"2024-08-01T09:00:50.792Z","updated_at":"2025-04-13T02:12:15.580Z","avatar_url":"https://github.com/endel.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Node"],"sub_categories":["库"],"readme":"# DEPRECATION NOTICE\n\nAs of Node.js v8.0 shipped August 2017, you can now use the `NODE_OPTIONS`\nenvironment variable to set the max_old_space_size globally. ([#19](https://github.com/endel/increase-memory-limit/issues/19))\n\n```\nexport NODE_OPTIONS=--max_old_space_size=4096\n```\n\nincrease-memory-limit\n===\n\nWorkaround to fix `heap out of memory` when running node binaries. It's a common\nissue when using TypeScript 2.1+ and webpack.\n\nThis tool will append `--max-old-space-size=4096` in all `node` calls inside\nyour `node_modules/.bin/*` files.\n\n```\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory\n```\n\nHow to use\n---\n\n```\nnpm install -g increase-memory-limit\n```\n\nRun from the root location of your project:\n\n```\nincrease-memory-limit\n```\n\nRunning from NPM task\n---\n\nAlternatively, you can configure a npm task to run the fix.\n\n```javascript\n// ...\n  \"scripts\": {\n    \"fix-memory-limit\": \"cross-env LIMIT=2048 increase-memory-limit\"\n  },\n  \"devDependencies\": {\n    \"increase-memory-limit\": \"^1.0.3\",\n    \"cross-env\": \"^5.0.5\"\n  }\n// ...\n```\n\n```\nnpm run fix-memory-limit\n```\n\nLicense\n---\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendel%2Fincrease-memory-limit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendel%2Fincrease-memory-limit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendel%2Fincrease-memory-limit/lists"}