Gatsby: How to change package manager to yarn in windows 10?

Created on 5 Aug 2020  路  4Comments  路  Source: gatsbyjs/gatsby

I wanted to try gatsby today. So, I installed gatsby as global using yarn ( using yarn global add gatsby-cli ). then tried gatsby new gatsby-site https://github.com/gatsbyjs/gatsby-starter-hello-world and the command prompt in windows showed some unrecognizable characters. So, I closed the CMD and tried gatsby new gatsby-site https://github.com/gatsbyjs/gatsby-starter-hello-world again. This time, it started to install packages using NPM and I choose what package manager I want to use.

I tried to change the default package manager using this doc: https://www.gatsbyjs.org/docs/glossary/yarn/
But I can't find the .config file in windows. Any way to change default package manager in windows?
thanks

cli question or discussion

Most helpful comment

Like @SeanDYoko said open C:\Users\YOUR_USERNAME\.config\gatsby\config.json and edit "packageManager" to yarn

All 4 comments

This isn't really a gatsby issue...
~/ refers to your home directory so in users you'd go to C:UsersYOUR_USERNAME.configgatsby.

Like @SeanDYoko said open C:\Users\YOUR_USERNAME\.config\gatsby\config.json and edit "packageManager" to yarn

Thank you for opening this, @p32929

We're marking this issue as answered and closing it for now but please feel free to reopen this and comment if you would like to continue this discussion. We hope we managed to help and thank you for using Gatsby! 馃挏

Thanks. But one small suggestion: It would be really nice if the folder location is also mentioned here: https://www.gatsbyjs.org/docs/glossary/yarn/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

magicly picture magicly  路  3Comments

brandonmp picture brandonmp  路  3Comments

dustinhorton picture dustinhorton  路  3Comments

theduke picture theduke  路  3Comments

rossPatton picture rossPatton  路  3Comments