Neatly Positioned Magazines
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    increase-memory-limitpublic

    Sponsor

    increase-memory-limit

    Workaround to fix heap out of memory when running node binaries. It's a common issue when using TypeScript 2.1+ and webpack.

    This tool will append --max-old-space-size=4096 in all node calls inside your node_modules/.bin/* files.

    FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
    

    How to use

    npm install -g increase-memory-limit
    

    Run from the root location of your project:

    increase-memory-limit
    

    Running from NPM task

    Alternatively, you can configure a npm task to run the fix.

    // ...
      "scripts": {
        "fix-memory-limit": "cross-env LIMIT=2048 increase-memory-limit"
      },
      "devDependencies": {
        "increase-memory-limit": "^1.0.3",
        "cross-env": "^5.0.5"
      }
    // ...
    npm run fix-memory-limit
    

    License

    MIT

    Keywords

    none

    install

    npm i increase-memory-limit

    Downloadsweekly downloads

    3,901

    version

    1.0.6

    license

    ISC

    repository

    github.com

    last publish

    collaborators

    • avatar