vue-vben-admin-doc icon indicating copy to clipboard operation
vue-vben-admin-doc copied to clipboard

pnpm dev 报错

Open lulifa opened this issue 1 year ago • 4 comments

PS D:\Project\docs\vue-vben-admin-doc> pnpm dev

[email protected] dev D:\Project\docs\vue-vben-admin-doc vitepress dev

vitepress v0.14.1 vite v2.9.18 (!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling.

lulifa avatar Aug 08 '24 08:08 lulifa

同问

ldeng76 avatar Aug 16 '24 10:08 ldeng76

同问啊

forose avatar Sep 06 '24 09:09 forose

我安装了几个依赖,执行build成功,执行serve可以预览了,但是dev还是报错。

"devDependencies": {
  "prettier": "^2.8.8",
  "vite-plugin-components": "^0.10.4",
  "vite-plugin-icons": "^0.6.5",
  "vite-plugin-windicss": "^1.9.3",
  "vitepress": "^0.14.1",
  "windicss": "^3.5.6"
},
"dependencies": {
  "@docsearch/css": "^3.6.2",
  "@docsearch/js": "^3.6.2",
  "@docsearch/react": "^3.6.2",
  "@iconify/json": "^1.1.461",
  "@vueuse/core": "^5.3.0",
  "vue": "^3.5.10"
}

改代码:.vitepress/theme-default/components/NavBar.vuedefineEmit 改成 defineEmits

aixiaodoucn avatar Sep 30 '24 01:09 aixiaodoucn

以下方式处理可正常运行 pnpm dev: vite.config.js添加build配置项,指定入口文件。

const config: UserConfig = {
  build: {
    rollupOptions: {
      input: '.vitepress/config.js'
    }
  },
  ......
};

package.json依赖包如下


  "devDependencies": {
    "prettier": "^2.8.8",
    "vite-plugin-components": "^0.10.4",
    "vite-plugin-icons": "^0.6.5",
    "vite-plugin-windicss": "^1.9.3",
    "vitepress": "^0.14.1",
    "windicss": "^3.5.6"
  },
  "dependencies": {
    "@docsearch/css": "^3.6.2",
    "@docsearch/js": "^3.6.2",
    "@docsearch/react": "^3.6.2",
    "@iconify/json": "^1.1.461",
    "@vueuse/core": "^5.3.0",
    "@vueuse/shared": "^11.1.0",
    "vue": "^3.5.10",
    "vue-demi": "^0.14.10"
  }

我的运行环境:node18.16,pnpm9.4,依赖包使用pnpm安装

aixiaodoucn avatar Sep 30 '24 02:09 aixiaodoucn