vue+vite 项目启动 esbuild 报错

dyld: Symbol not found: _SecTrustEvaluateWithError
  Referenced from: /Users/yseventeen/Vue_project/vue-vben-admin-main/vue-vben-admin/node_modules/.pnpm/[email protected]/node_modules/esbuild-darwin-64/bin/esbuild
  Expected in: flat namespace

failed to load config from /Users/yseventeen/Vue_project/vue-vben-admin-main/vue-vben-admin/vite.config.ts
error when starting dev server:
Error: The service was stopped
    at /Users/yseventeen/Vue_project/vue-vben-admin-main/vue-vben-admin/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1335:25
    at /Users/yseventeen/Vue_project/vue-vben-admin-main/vue-vben-admin/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:666:9
    at Socket.afterClose (/Users/yseventeen/Vue_project/vue-vben-admin-main/vue-vben-admin/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:644:7)
    at Socket.emit (node:events:538:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
 ELIFECYCLE  Command failed with exit code 1.

npm install 或者 npm run serve 的时候报错

构建esbuild 失败,这是esbuild 的bug

解决方法:删除node_mdules 使用 pnpm install 重新下载安装包即可解决

vue+vite 项目启动 esbuild 报错_第1张图片

你可能感兴趣的:(踩坑避雷系列,工作,vue.js,npm)