Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

High CPU usage from Node.js when running vue-cli-service serve

The CPU usage by Node goes well over 100% when I run my npm script, which is using vue-cli-service serve. How can I debug this issue?

I'm working on a Mac, Node installed through nvm. Node version: 10.16, npm version: 6.9

like image 703
Alessio Breviglieri Avatar asked Jun 26 '19 08:06

Alessio Breviglieri


People also ask

What is vue CLI service?

The CLI ( @vue/cli ) is a globally installed npm package and provides the vue command in your terminal. It provides the ability to quickly scaffold a new project via vue create . You can also manage your projects using a graphical user interface via vue ui .

How does vue CLI service Build work?

vue-cli-service build produces a production-ready bundle in the dist/ directory, with minification for JS/CSS/HTML and auto vendor chunk splitting for better caching. The chunk manifest is inlined into the HTML.

Does vue work with node js?

There are so many ways we can build Vue apps and ship for production. One way is to build the Vue app with NodeJS. In the development phase, we can run Vue UI and Nodejs on separate ports. The interaction between these two happens with proxying all the calls to API.

What is VUE JS and vue CLI?

Vue CLI v3 is a complete system for rapid Vue. js development and prototyping. It's composed of different components, such as the CLI service, CLI plugins and recently a web UI that allows developers to perform tasks via an easy-to-use interface.


1 Answers

Installing the fsevents module on MacOSX will help reduce the CPU usage.

npm install fsevents -g

npm rebuild fsevents

like image 84
ricosrealm Avatar answered Sep 22 '22 23:09

ricosrealm