Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Setting Up Vue CLI on Ubuntu

Tech May 10 45

Installing Node.js

Download the latest LTS vertion from the official Node.js website. Choose the Linux binaries archive, then extract it.

Move the extracted folder to the software installation directory:

mv node-v14.17.1-linux-x64 /usr/local/soft/

Create symbolic links for node and npm:

ln -s /usr/local/soft/node-v14.17.1-linux-x64/bin/node /usr/local/bin/node
ln -s /usr/local/soft/node-v14.17.1-linux-x64/bin/npm /usr/local/bin/npm

Verify the installations:

node -v
npm -v

Configuring cnpm (Optional)

Install cnpm to use the Taobao NPM mirror:

npm install -g cnpm --registry=https://registry.npmmirror.com/

If the mirror fails during installation, search for latest mirror URL and replace the one after --registry=.

Create a symbolic link:

ln -s /usr/local/soft/node-v14.17.1-linux-x64/bin/cnpm /usr/local/bin/cnpm

Test the setup:

cnpm -v

Installing Vue CLI

Use npm to install @vue/cli globally:

npm install -g @vue/cli

Create a symbolic link for the vue command:

ln -s /usr/local/soft/node-v14.17.1-linux-x64/bin/vue /usr/local/bin/vue

Check the location:

whereis vue

Confirm the installed version:

vue -V

Related Articles

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

SBUS Signal Analysis and Communication Implementation Using STM32 with Fus Remote Controller

Overview In a recent project, I utilized the SBUS protocol with the Fus remote controller to control a vehicle's basic operations, including movement, lights, and mode switching. This article is aimed...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.