vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

vitepress v1.0.0-alpha.4 `yarn docs:build` fail

Open MrMJY opened this issue 2 years ago • 3 comments

Describe the bug

  1. This is a new project.
  2. yarn docs:dev can start normally.
  3. yarn docs:build fail.

Reproduction

This is a new project. Only one file(index.md) is added in the docs directory. Then yarn docs:build fail.

Expected behavior

yarn docs:build success.

System Info

System:
    OS: Windows 10 10.0.18363
    CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz     
    Memory: 7.11 GB / 15.86 GB
  Binaries:
    Node: 16.13.1 - D:\software\nodejs\node.EXE
    Yarn: 1.22.17 - D:\software\nodejs\yarn.CMD
    npm: 8.1.2 - D:\software\nodejs\npm.CMD
  Browsers:
    Chrome: 103.0.5060.114
    Edge: Spartan (44.18362.1533.0)
    Internet Explorer: 11.0.18362.1
  npmPackages:
    vitepress: ^1.0.0-alpha.4 => 1.0.0-alpha.4

Additional context

$ yarn docs:build
yarn run v1.22.17
$ vitepress build docs
vitepress v1.0.0-alpha.4
✓ building client + server bundles...
✓ rendering pages...
build error:
 [Error: ENOTEMPTY: directory not empty, rmdir 'C:\Users\Administrator\Desktop\blog\docs\.vitepress\.temp'] {
  errno: -4051,
  code: 'ENOTEMPTY',
  syscall: 'rmdir',
  path: 'C:\\Users\\Administrator\\Desktop\\blog\\docs\\.vitepress\\.temp'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Validations

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

MrMJY avatar Jul 17 '22 09:07 MrMJY

---
layout: home

hero:
  name: 笔记
  tagline: 一份随笔
  actions:
    - theme: brand
      text: 开始吧
      link: /start/

features:
  - icon: ⚡️
    title: Vite, The DX that can't be beat
    details: Lorem ipsum...
  - icon: 🖖
    title: Power of Vue meets Markdown
    details: Lorem ipsum...
  - icon: 🛠️
    title: Simple and minimal, always
    details: Lorem ipsum...
---

MrMJY avatar Jul 17 '22 09:07 MrMJY

Try removing that .vitepress\.temp directory manually. This won't happen on the Vite 3 branch, I'd changed deletion there to be recursive-forced.

brc-dd avatar Jul 17 '22 10:07 brc-dd

  1. How to migrate from vuepress to vitepress?
  2. The writing in vuepress is correct, but in vitepress is incorrect , but no detailed errors are given, resulting in the unable to locate the wrong position.(Error: ENOTEMPTY: directory not empty, rmdir 'C:\Users\Administrator\Desktop\blog\docs\.vitepress\.temp')

MrMJY avatar Jul 18 '22 06:07 MrMJY

pnpm add -D vitepress@npm:@brc-dd/vitepress@next

The problem has been resolved.

I want to ask about custom styles, theme related configuration. Because some of the default styles are not appropriate.

MrMJY avatar Aug 16 '22 01:08 MrMJY

Yeah, about that, don't use that package for your site. It's meant only for testing and might break stuff without any notice.

brc-dd avatar Aug 16 '22 05:08 brc-dd

pnpm add -D vitepress@npm:@brc-dd/vitepress@next

The problem has been resolved.

I want to ask about custom styles, theme related configuration. Because some of the default styles are not appropriate.

I can't resolve this problem by this way, did you use another solution ?

xiezijie4396 avatar Nov 21 '22 07:11 xiezijie4396

pnpm add -D vitepress@npm:@brc-dd/vitepress@next

这个问题已经解决。 我想问一下自定义样式,主题相关的配置。因为有些默认的样式不合适。

我无法通过这种方式解决此问题,您是否使用了其他解决方案?

一样的问题哦

vitepress v1.0.0-alpha.4
⠹ building client + server bundles...
(!) Some chunks are larger than 500 KiB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ building client + server bundles...
✓ rendering pages...
build error:
 [Error: ENOTEMPTY: directory not empty, rmdir 'F:\project-lmq\wetok-admin-doc\docs\.vitepress\.temp\img\Verdaccio.assets'] {
  errno: -4051,
  code: 'ENOTEMPTY',
  syscall: 'rmdir',
  path: 'F:\\project-lmq\\wetok-admin-doc\\docs\\.vitepress\\.temp\\img\\Verdaccio.assets'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ docs:build: `vitepress build docs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ docs:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2022-11-30T12_39_26_367Z-debug.log

lmq352489099 avatar Nov 30 '22 12:11 lmq352489099