node 内存溢出的解决方案

image.png
image.png

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

解决如下
cnpm install --save-dev increase-memory-limit
package.json

{

  "scripts": {
      "fix-memory-limit": "cross-env LIMIT=4096 increase-memory-limit"
  },
  "devDependencies": {
    "increase-memory-limit": "^1.0.7",
  },
}

cnpm run fix-memory-limit
increase-memory-limit
cnpm run dev

好啦 买好吃的去

https://www.npmjs.com/package/increase-memory-limit

你可能感兴趣的:(node 内存溢出的解决方案)