Coder Social home page Coder Social logo

cklwblove / increase-memory-limit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from endel/increase-memory-limit

0.0 2.0 0.0 19 KB

Increase memory limit for local node binaries ("max-old-space-size")

Home Page: http://npmjs.com/package/increase-memory-limit

License: MIT License

JavaScript 100.00%

increase-memory-limit's Introduction

DEPRECATION NOTICE

As of Node.js v8.0 shipped August 2017, you can now use the NODE_OPTIONS environment variable to set the max_old_space_size globally. (#19)

export NODE_OPTIONS=--max_old_space_size=4096

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

increase-memory-limit's People

Contributors

endel avatar cklwblove avatar bartolkaruza avatar ajcrites avatar sandorfr avatar etheryte avatar toddb avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.