Skip to content

Instantly share code, notes, and snippets.

@epomatti
Last active September 20, 2022 21:39
Show Gist options
  • Save epomatti/1f32be1921543dd7bef0a59579ed7d81 to your computer and use it in GitHub Desktop.
Save epomatti/1f32be1921543dd7bef0a59579ed7d81 to your computer and use it in GitHub Desktop.
Yarn 3 init

Here's how to init your Node.js project with latest Yarn version:

Enable corepack (Node.js >=16.10)

corepack enable

Set the latest versions:

yarn set version berry

Ready to init:

yarn init

If you don't want zero-installs, swap comments in the .gitignore

If you're already in a git project, do rm -rf .git

Might need to set this for typescript

yarn dlx @yarnpkg/sdks vscode

https://yarnpkg.com/getting-started/editor-sdks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment