How to init Astro project using yarn berry?

Posted on


At this moment, if you are trying to init a new Astro project, you will experience some technical problems and the Astro project does not run properly as expected.

GitHub issue: #5637.


  1. Dependency modules was not installed.

    • cd into project root folder.
    • Create an empty yarn.lock.
    • Run yarn install.
    • Run yarn dev.
  2. Astro page displays an error.

    • Add this line into .yarnrc.yml.

      nodeLinker: node-modules
      nodeLinker: node-modules
    • Run yarn install.

    • Run yarn dev

    • Refresh the Astro page.