Since Salesforce Launched Lightning Web Components, it has become increasingly popular among Salesforce developers due to its modern approach to web development, improved performance, and seamless integration with other Salesforce services. To get started with LWC development, we need to set up the environment with the necessary tools and software. This includes installing a code editor like Visual Studio Code, the Salesforce CLI (Command Line Interface) tool, and Node.js. In this article, I will provide a step-by-step guide setup environment for LWC development. Whether you are a new or an experienced developer looking to streamline your workflow, this article will help you get started on the right foot. Let’s dive in!
System Pre-requisites
There are no such fancy system requirements such as high processor and all. But I can say, the bare minimum requirement to run the software smoothly with be an updated OS (Windows 10+ or the latest macOS). Along with that, for faster performance and smoother operations, min 8 GB RAM would be ideal. Apart from that, make sure your machine is in proper working condition.
Software Installation for LWC Development:
VS Code
Follow the below steps to install VS Code:
- Go to the official VS Code website at https://code.visualstudio.com/.
- Click on the “Download for Windows/mac” button and download the installer.
- Once the download is complete, run the installer by double-clicking on the downloaded file.
- Follow the installation wizard to complete the installation process. You can accept the default settings or choose custom settings based on your preferences.
That’s it! You now have VS Code installed on your Windows/mac computer. In the next section, we will discuss how to install the Salesforce CLI tool.
You can also refer to the video below:
Node Js
Node.js is a popular JavaScript runtime that allows you to run JavaScript on the server side. It is required to develop and run LWC components locally. Also, when you are in process of org authorization, a local server is required to be created for the oAuth process. To install Node.js, follow these steps:
- Go to the official Node.js website at https://nodejs.org/.
- Click on “Download” to download the installer for your OS. Choose the version that matches your system architecture (32-bit or 64-bit).
- Once the download is complete, run the installer by double-clicking on the downloaded file.
- Follow the installation wizard to complete the installation process. You can accept the default settings or choose custom settings based on your preferences.
- When the installation is complete, open a command prompt or terminal window and type “node -v” to check if Node.js is installed correctly. You should see the version number of Node.js that you installed.
That’s it! You have now installed Node.js on your system. In the next section, we will discuss how to install the Salesforce CLI tool.
SFDX CLI
The Salesforce CLI (SFDX CLI) is a powerful command-line interface tool that allows us to manage our Salesforce orgs, create and deploy LWC Components, and many more. SFDX CLI is an executable that is required to be installed as a package in your system. To install the SFDX CLI tool, follow these steps:
- Go to the official website at https://developer.salesforce.com/tools/sfdxcli.
- Click on the “Download Salesforce CLI for Windows or Mac” button to download the SFDX CLI installer.
- Once the download is complete, run the installer by double-clicking on the downloaded file.
- Follow the installation wizard to complete the installation process. Here, you will need admin access to the system.
- You can accept the default settings or choose custom settings based on your preferences.
- When the installation is complete, open a command prompt or terminal window and type “sfdx” to check if the SFDX CLI tool is installed correctly. You should see a list of available commands.
That’s it! You have now installed the SFDX CLI tool on your system. You can also refer to the below video:
Salesforce Extension Pack
Refer to the below video for installation of the Salesforce Extension Pack:
Troubleshooting
Post all of your queries in the comments. I will update this section with answers.
Abhishek
Mr. Abhishek, an experienced Salesforce Technical Lead with over 4+ years of development experience and 8x Salesforce Certified. His expertise is in Salesforce Development, including Lightning Web Components, Apex Programming, and Flow has led him to create his blog, SFDC Hub.