Skip to content

Build script does not work with Yarn Berry #435

@thefrana

Description

@thefrana

Describe the bug

I created a new project by following the instructions here. I only added yarn set version berry. Also, there is a small undocumented issue that I had to manually add Vue 3 dependency.

When I run yarn docs:build, it does not work.

vitepress v0.20.0
⠸ building client + server bundles...EROFS: read-only filesystem, mkdir '/node_modules/vitepress/dist/client/app/temp'
✖ building client + server bundles...
build error:
 [Error: ENOTDIR: not a directory, unlink '/home/lukeeno/vitepress-starter/.yarn/cache/vitepress-npm-0.20.0-e06cb3d514-59d85243c3.zip/node_modules/vitepress/dist/client/app/temp'] {
  errno: -20,
  code: 'ENOTDIR',
  syscall: 'unlink',
  path: '/home/lukeeno/vitepress-starter/.yarn/cache/vitepress-npm-0.20.0-e06cb3d514-59d85243c3.zip/node_modules/vitepress/dist/client/app/temp'
}

Reproduction

mkdir vitepress-starter && cd vitepress-starter
yarn init -y
yarn set version berry
yarn add --dev vitepress vue@^3.2.13
mkdir docs && echo '# Hello VitePress' > docs/index.md
yarn vitepress build docs

Expected behavior

It should build the docs.

System Info

System:
    OS: Linux 5.14 undefined
    CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
    Memory: 3.50 GB / 15.50 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 16.11.1 - /usr/bin/node
    Yarn: 3.1.0 - /usr/bin/yarn
    npm: 8.1.0 - /usr/bin/npm
  Browsers:
    Chromium: 95.0.4638.54
    Firefox: 93.0

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions