DEV Community

Cover image for Installing open-wc on a MacOS Laptop
Taylor-Bracone
Taylor-Bracone

Posted on • Edited on

Installing open-wc on a MacOS Laptop

Hi guys! In this post, I am going to talk about how to get dependencies on MacOS and the installation of open-wc.

First, make sure you have the correct version of Nodejs installed on your computer. Link: https://nodejs.org/en/. Also, make sure to download Visual Studio Code. Link: https://code.visualstudio.com/download.

Next, create a folder to store projects for IST 402 and name it, for example, “edtechjoker.”

Then, open up the terminal, which can be done multiple ways, but my personal favorite is hold command, space bar, and type in terminal then enter. Next, go to the directory where the folder is stored. For example, cd Desktop (enter) cd edtechjoker (enter). Once in that folder from the terminal, a good practice is to ls to see the contents of the folder.

A. Then type the command:
npm install —global yarn

If an error states that permissions are needed, then run the command:
sudo npm install —global yarn

B. npm init @open-wc

C. It will prompt you to make a few decisions next:

      a. Select Scaffold a new project (enter)
Alt Text

      b. Select Web Component
Alt Text

      c. Use the spacebar to Select Linting, Testing, Demoing (enter)
Alt Text

      d. Select No for Typescript

      e. Tag name should be called hello-world, all lowercase

      f. Select Yes to file structure to disk
Alt Text

      g. Select Yes, with yarn

D. A confirmation message should pop up
Alt Text

Good Luck!

Top comments (0)