PS G:\anyfork-common-admin\vue-anyfork-admin> pnpm dev
> vue-anyfork-admin@0.0.0 dev G:\anyfork-common-admin\vue-anyfork-admin
> vite
failed to load config from G:\anyfork-common-admin\vue-anyfork-admin\vite.config.ts
error when starting dev server:
file:///G:/anyfork-common-admin/vue-anyfork-admin/node_modules/.pnpm/registry.npmmirror.com+@soybeanjs+vite-plugin-vue-page-route@0.0.7/node_modules/@soybeanjs/vite-plugin-vue-page-route/dist/index.mjs:49
import { isMatch } from "micromatch";
^^^^^^^
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'micromatch';
const { isMatch } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:533:24)
at async loadConfigFromBundledFile (file:///G:/anyfork-common-admin/vue-anyfork-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.4_@types+node@20.4.2/node_modules/vite/dist/node/chunks/dep-abb4f102.js:66128:21)
at async loadConfigFromFile (file:///G:/anyfork-common-admin/vue-anyfork-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.4_@types+node@20.4.2/node_modules/vite/dist/node/chunks/dep-abb4f102.js:65979:28)
at async resolveConfig (file:///G:/anyfork-common-admin/vue-anyfork-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.4_@types+node@20.4.2/node_modules/vite/dist/node/chunks/dep-abb4f102.js:65575:28)
at async _createServer (file:///G:/anyfork-common-admin/vue-anyfork-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.4_@types+node@20.4.2/node_modules/vite/dist/node/chunks/dep-abb4f102.js:64846:20)
at async CAC.<anonymous> (file:///G:/anyfork-common-admin/vue-anyfork-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.4_@types+node@20.4.2/node_modules/vite/dist/node/cli.js:743:24)
ELIFECYCLE Command failed with exit code 1.
配置如下:
启动报错