From the course: SharePoint Framework for Developers: 1 Understanding the Toolchain
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Using Yarn to install dependencies
From the course: SharePoint Framework for Developers: 1 Understanding the Toolchain
Using Yarn to install dependencies
- [Male Instructor] So, at this point, I have a simple load-based project that relies on moment js, and I have run a PM install which created the package-lock.json file, and it also created this node_modules, inside of which I have the moment folder. I can achieve nearly the same thing with yarn. Let's see that in action. Let's remove the node_modules folder, rm -rf node_modules and here I have the package-lock and package.json file present, and I'll say "yarn install." Remember, you need to have yarn installed globally before you can run yarn like this on command prompt. So, I'll say, "yarn install," hit Enter, and it says, "No lockfile found. Resolving packages," and at the end of it, it downloaded the node_modules folder. Let's look at this in VS code. See that? Exactly the same results as before, but it also created a yarn.lock file. The format of the yarn.lock file is slightly different but the purpose is identical to package-lock.json. So, at this point, we have installed…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.