Method 1 is for build failure, and methods 2 and 3 are for dev error.

Method 1: In the package.json file, modify Build

"scripts": {
  "build": "node --max_old_space_size=8192 build/build.js"
}

Increase – Memory – Limit plugin

1. Installation:

npm install -g increase-memory-limit

2. Execution under the project directory:

increase-memory-limit

Increase – Memory – Limit plugin

1. Install

npm install -g increase-memory-limit
npm install -g cross-env

2. Perform

npm run fix-memory-limit

(If this fails, increase-memory-limit is executed in the direct directory) 3. Start vue.cli. Service.js in the project node_modules@vue and manually delete: –max-old-space-size=6144



After methods 2 and 3 have been run, this is the code that has been written and you can rerun the project