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
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 .
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.
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.
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.
Installing the fsevents
module on MacOSX will help reduce the CPU usage.
npm install fsevents -g
npm rebuild fsevents
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With