Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial1 Answer

andren
28,550 PointsYou don't specify what course you are referencing, but in general the answer to that question is yes. Yarn is designed to be a drop-in replacement for npm.
Some of its syntax and behavior is slightly different, but it generates a package.json
file that is npm compatible, and it can also read npm package.json
files without issue.
I have personally moved to yarn for all of my projects, though I still use npm to install global packages since that has been buggy for me with Yarn on Windows.