-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Open
Labels
Description
Version
Vben Admin V5
Describe the bug?
将 vben 的包发布到 npm 私服后,在新项目使用提示一些依赖存在路径问题。
PS:发布需要移除 "private": true 标记,以及存在部分模块的版本号不统一的问题。
Reproduction
不能以源码复现
System Info
System:
OS: macOS 26.1
CPU: (12) arm64 Apple M2 Max
Memory: 1.60 GB / 32.00 GB
Shell: 4.2.0 - /opt/homebrew/bin/fish
Binaries:
Node: 22.14.0 - /Users/blue/.config/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.9.2 - /Users/blue/.config/bin/npm
pnpm: 10.14.0 - /opt/homebrew/bin/pnpm
Browsers:
Edge: 142.0.3595.65
Safari: 26.1Relevant log output
~/WebstormProjects/dw-pro-frontend dev* ❯ pnpm run dev
> [email protected] dev /Users/blue/WebstormProjects/dw-pro-frontend
> turbo-run dev
> [email protected] dev /Users/blue/WebstormProjects/dw-pro-frontend/apps/dw-pro-web-all
> pnpm vite --mode development
14:45:34
VITE v7.1.7 ready in 1149 ms
➜ Local: http://localhost:5666/ 14:45:34
➜ Network: http://172.18.3.51:5666/ 14:45:34
➜ Vben Admin Docs: https://doc.vben.pro 14:45:34
➜ press h + enter to show help 14:45:34
WARN [@vue/compiler-sfc] defineEmits is a compiler macro and no longer needs to be imported. 14:45:34
WARN [@vue/compiler-sfc] defineExpose is a compiler macro and no longer needs to be imported. 14:45:34
WARN [@vue/compiler-sfc] defineOptions is a compiler macro and no longer needs to be imported. 14:45:34
✘ [ERROR] Could not resolve "../../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs"
../../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@vben-core/shared/dist/utils/index.mjs:1:27:
1 │ import { createJiti } from "../../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "../../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs"
../../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@vben-core/shared/dist/cache/index.mjs:1:27:
1 │ import { createJiti } from "../../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "../../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs"
../../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@vben-core/shared/dist/color/index.mjs:1:27:
1 │ import { createJiti } from "../../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "../../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs"
../../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@vben-core/shared/dist/constants/index.mjs:1:27:
1 │ import { createJiti } from "../../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs"
../../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@vben-core/shared/dist/store.mjs:1:27:
1 │ import { createJiti } from "../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "./components"
../../node_modules/.pnpm/@[email protected][email protected]/node_modules/@vben-core/shadcn-ui/src/index.ts:1:14:
1 │ export * from './components';
╵ ~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "./ui"
../../node_modules/.pnpm/@[email protected][email protected]/node_modules/@vben-core/shadcn-ui/src/index.ts:2:14:
2 │ export * from './ui';
╵ ~~~~~~
✘ [ERROR] Could not resolve "../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs"
../../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@vben-core/shared/dist/global-state.mjs:1:27:
1 │ import { createJiti } from "../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/blue/WebstormProjects/dw-pro-frontend/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1477
let error = new Error(text);
^
Error: Error during dependency optimization:
✘ [ERROR] Could not resolve "./components"
../../node_modules/.pnpm/@[email protected][email protected]/node_modules/@vben-core/shadcn-ui/src/index.ts:1:14:
1 │ export * from './components';
╵ ~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "./ui"
../../node_modules/.pnpm/@[email protected][email protected]/node_modules/@vben-core/shadcn-ui/src/index.ts:2:14:
2 │ export * from './ui';
╵ ~~~~~~
✘ [ERROR] Could not resolve "../../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs"
../../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@vben-core/shared/dist/cache/index.mjs:1:27:
1 │ ...iti } from "../../../../../../node_modules/.pnpm/[email protected]/node...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "../../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs"
../../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@vben-core/shared/dist/color/index.mjs:1:27:
1 │ ...iti } from "../../../../../../node_modules/.pnpm/[email protected]/node...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "../../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs"
../../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@vben-core/shared/dist/constants/index.mjs:1:27:
1 │ ...iti } from "../../../../../../node_modules/.pnpm/[email protected]/node...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs"
../../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@vben-core/shared/dist/global-state.mjs:1:27:
1 │ ...iti } from "../../../../../node_modules/.pnpm/[email protected]/node_mo...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs"
../../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@vben-core/shared/dist/store.mjs:1:27:
1 │ ...iti } from "../../../../../node_modules/.pnpm/[email protected]/node_mo...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "../../../../../../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs"
../../node_modules/.pnpm/@[email protected][email protected][email protected]_/node_modules/@vben-core/shared/dist/utils/index.mjs:1:27:
1 │ ...iti } from "../../../../../../node_modules/.pnpm/[email protected]/node...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at failureErrorWithLog (/Users/blue/WebstormProjects/dw-pro-frontend/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1477:15)
at /Users/blue/WebstormProjects/dw-pro-frontend/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:946:25
at /Users/blue/WebstormProjects/dw-pro-frontend/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1355:9
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
errors: [Getter/Setter],
warnings: [Getter/Setter]
}
Node.js v22.14.0
/Users/blue/WebstormProjects/dw-pro-frontend/apps/dw-pro-web-all:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL [email protected] dev: `pnpm vite --mode development`
Exit status 1
file:///Users/blue/WebstormProjects/dw-pro-frontend/node_modules/.pnpm/[email protected]/node_modules/execa/lib/return/final-error.js:6
return new ErrorClass(message, options);
^
ExecaError: Command failed with exit code 1: pnpm '--filter=dw-pro-web-all' run dev
at getFinalError (file:///Users/blue/WebstormProjects/dw-pro-frontend/node_modules/.pnpm/[email protected]/node_modules/execa/lib/return/final-error.js:6:9)
at makeError (file:///Users/blue/WebstormProjects/dw-pro-frontend/node_modules/.pnpm/[email protected]/node_modules/execa/lib/return/result.js:108:16)
at getAsyncResult (file:///Users/blue/WebstormProjects/dw-pro-frontend/node_modules/.pnpm/[email protected]/node_modules/execa/lib/methods/main-async.js:168:4)
at handlePromise (file:///Users/blue/WebstormProjects/dw-pro-frontend/node_modules/.pnpm/[email protected]/node_modules/execa/lib/methods/main-async.js:151:17)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
shortMessage: "Command failed with exit code 1: pnpm '--filter=dw-pro-web-all' run dev",
command: 'pnpm --filter=dw-pro-web-all run dev',
escapedCommand: "pnpm '--filter=dw-pro-web-all' run dev",
cwd: '/Users/blue/WebstormProjects/dw-pro-frontend',
durationMs: 2917.097375,
failed: true,
timedOut: false,
isCanceled: false,
isGracefullyCanceled: false,
isTerminated: false,
isMaxBuffer: false,
isForcefullyTerminated: false,
exitCode: 1,
stdio: [ undefined, undefined, undefined ],
ipcOutput: [],
pipedFrom: []
}
Node.js v22.14.0
ELIFECYCLE Command failed with exit code 1.
~/WebstormProjects/dw-pro-frontend dev* ❯Validations
- Read the docs
- Ensure the code is up to date. (Some issues have been fixed in the latest version)
- I have searched the existing issues and checked that my issue does not duplicate any existing issues.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.