安装umi4阻碍一天的问题解决了

umi4已经发布一段时间了,现在项目中还是用的umi3版本,umi3最坑的就是mfsu不会热更新,而且umi4新增了一些功能,所以打算把umi版本升级下。

问题

通过 npm create umi,选择pnpm安装。
报错:dyld: Symbol not found: _SecTrustEvaluateWithError

环境:
mac os: 10.12.6
node.js: v16.14.2

pnpm报错:

Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /Users/keven/Library/pnpm/store/v3
  Virtual store is at:             node_modules/.pnpm
Progress: resolved 1192, reused 1063, downloaded 0, added 1112, done
node_modules/.pnpm/esbuild@0.14.36/node_modules/esbuild: Running postinstall script, failed in 568ms
.../esbuild@0.14.36/node_modules/esbuild postinstall$ node install.js
│ node:child_process:828
│     err = new Error(msg);
│           ^
│ Error: Command failed: /Users/keven/Documents/personal/code/umi/antd/node_modules/.pnpm/esbuild@0.14.36/node_m
│ dyld: Symbol not found: _SecTrustEvaluateWithError
│   Referenced from: /Users/keven/Documents/personal/code/umi/antd/node_modules/.pnpm/esbuild@0.14.36/node_modul
│   Expected in: flat namespace
│     at checkExecSyncError (node:child_process:828:11)
│     at Object.execFileSync (node:child_process:866:15)
│     at validateBinaryVersion (/Users/keven/Documents/personal/code/umi/antd/node_modules/.pnpm/esbuild@0.14.36
│     at /Users/keven/Documents/personal/code/umi/antd/node_modules/.pnpm/esbuild@0.14.36/node_modules/esbuild/i
│   status: null,
│   signal: 'SIGABRT',
│   output: [
│     null,
│     Buffer(0) [Uint8Array] [],
│     Buffer(215) [Uint8Array] [
│       100, 121, 108, 100,  58,  32,  83, 121, 109,  98, 111, 108,
│        32, 110, 111, 116,  32, 102, 111, 117, 110, 100,  58,  32,
│        95,  83, 101,  99,  84, 114, 117, 115, 116,  69, 118,  97,
│       108, 117,  97, 116, 101,  87, 105, 116, 104,  69, 114, 114,
│       111, 114,  10,  32,  32,  82, 101, 102, 101, 114, 101, 110,
│        99, 101, 100,  32, 102, 114, 111, 109,  58,  32,  47,  85,
│       115, 101, 114, 115,  47, 107, 101, 118, 101, 110,  47,  68,
│       111,  99, 117, 109, 101, 110, 116, 115,  47, 112, 101, 114,
│       115, 111, 110,  97,
│       ... 115 more items
│     ]
│   ],
│   pid: 15457,
│   stdout: Buffer(0) [Uint8Array] [],
│   stderr: Buffer(215) [Uint8Array] [
│     100, 121, 108, 100,  58,  32,  83, 121, 109,  98, 111, 108,
│      32, 110, 111, 116,  32, 102, 111, 117, 110, 100,  58,  32,
│      95,  83, 101,  99,  84, 114, 117, 115, 116,  69, 118,  97,
│     108, 117,  97, 116, 101,  87, 105, 116, 104,  69, 114, 114,
│     111, 114,  10,  32,  32,  82, 101, 102, 101, 114, 101, 110,
│      99, 101, 100,  32, 102, 114, 111, 109,  58,  32,  47,  85,
│     115, 101, 114, 115,  47, 107, 101, 118, 101, 110,  47,  68,
│     111,  99, 117, 109, 101, 110, 116, 115,  47, 112, 101, 114,
│     115, 111, 110,  97,
│     ... 115 more items
│   ]
│ }
└─ Failed in 569ms
 ELIFECYCLE  Command failed with exit code 1.

换yarn试试,同样报错

error /Users/keven/Documents/personal/code/umi/antd/node_modules/esbuild: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: /Users/keven/Documents/personal/code/umi/antd/node_modules/esbuild
Output:
node:child_process:828
    err = new Error(msg);
          ^

Error: Command failed: node /Users/keven/Documents/personal/code/umi/antd/node_modules/esbuild/bin/esbuild --version
dyld: Symbol not found: _SecTrustEvaluateWithError
  Referenced from: /Users/keven/Documents/personal/code/umi/antd/node_modules/esbuild-darwin-64/bin/esbuild
  Expected in: flat namespace

node:child_process:869
    throw err;
    ^

Error: Command failed: /Users/keven/Documents/personal/code/umi/antd/node_modules/esbuild-darwin-64/bin/esbuild --version
    at checkExecSyncError (node:child_process:828:11)
    at Object.execFileSync (node:child_process:866:15)
    at Object.<anonymous> (/Users/keven/Documents/personal/code/umi/antd/node_modules/esbuild/bin/esbuild:172:28)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  status: null,
  signal: 'SIGABRT',
  output: [ null, null, null ],
  pid: 15677,
  stdout: null,
  stderr: null
}

    at checkExecSyncError (node:child_process:828:11)
    at Object.execFileSync (node:child_process:866:15)
    at validateBinaryVersion (/Users/keven/Documents/personal/code/umi/antd/node_modules/esbuild/install.js:101:32)
    at /Users/keven/Documents/personal/code/umi/antd/node_modules/esbuild/install.js:249:5 {
  status: 1,
  signal: null,
  output: [
    null,
    Buffer(0) [Uint8Array] [],
    Buffer(1114) [Uint8Array] [
      100, 121, 108, 100,  58,  32,  83, 121, 109,  98, 111, 108,
       32, 110, 111, 116,  32, 102, 111, 117, 110, 100,  58,  32,
       95,  83, 101,  99,  84, 114, 117, 115, 116,  69, 118,  97,
      108, 117,  97, 116, 101,  87, 105, 116, 104,  69, 114, 114,
      111, 114,  10,  32,  32,  82, 101, 102, 101, 114, 101, 110,
       99, 101, 100,  32, 102, 114, 111, 109,  58,  32,  47,  85,
      115, 101, 114, 115,  47, 107, 101, 118, 101, 110,  47,  68,
      111,  99, 117, 109, 101, 110, 116, 115,  47, 112, 101, 114,
      115, 111, 110,  97,
      ... 1014 more items
    ]
  ],
  pid: 15676,
  stdout: Buffer(0) [Uint8Array] [],
  stderr: Buffer(1114) [Uint8Array] [
    100, 121, 108, 100,  58,  32,  83, 121, 109,  98, 111, 108,
     32, 110, 111, 116,  32, 102, 111, 117, 110, 100,  58,  32,
     95,  83, 101,  99,  84, 114, 117, 115, 116,  69, 118,  97,
    108, 117,  97, 116, 101,  87, 105, 116, 104,  69, 114, 114,
    111, 114,  10,  32,  32,  82, 101, 102, 101, 114, 101, 110,
     99, 101, 100,  32, 102, 114, 111, 109,  58,  32,  47,  85,
    115, 101, 114, 115,  47, 107, 101, 118, 101, 110,  47,  68,
    111,  99, 117, 109, 101, 110, 116, 115,  47, 112, 101, 114,
    115, 111, 110,  97,

解决办法

官方也有人提同样的问题,但是没有解决办法,https://github.com/evanw/esbuild/issues/2183

有的文章说是go版本的问题,和go没关系,主要是因为esbuild版本问题。

最终解决办法,在package.json加上下面的配置,主要是通过npm override来改变esbuild版本信息

"devDependencies": {
  "esbuild-wasm":"latest"
},
"overrides": {
  "esbuild":"npm:esbuild-wasm@latest"
}

执行npm install就安装好了

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 7
    评论
微狗(UMI/UMC/PMH/PMI)驱动安装程序是安装在 Windows 9X/ME/NT/2K/XP/WS2003/Vista /XP64/WS2003x64/Vista64环境下的驱动的程序。 加密后的 Win32 应用程序在 Windows 9x以及Windows ME 下运行时,需要安装硬件狗 Windows 9x 的设备驱动程序。 加密后的 DOS16,DOS32,WIN16,WIN32 应用程序在 Windows NT/2K/XP下运行时,必须要安装 硬件狗 Windows NT/2K/XP 的设备驱动程序。 本版MicroDogInstdrv.exe通过调用RCMicroDogSetup.dll的接口函数DriverDialog来显示驱动安装、 卸载界面。用户既可以使用MicroDogInstdrv.exe来安装和卸载自己的驱动程序,也可以自行构造界 面来安装和卸载驱动程序。 运行MicroDogInstdrv.exe点击安装按钮来安装驱动程序,该程序可自动识别操作系统,并提示安装状态。 注意:在Windows Vista下,需要右健点击安装程序,在弹出的菜单 中选择"Run as administrator"来运行安装程序。 软件开发商不但在加密时需要安装该设备驱动程序,而且在发行软件时,也应根据最终用户的操 作系统,安装相应的设备驱动程序。 如果您需要卸载狗的驱动程序,可以运行MicroDogInstdrv.exe点击卸载按钮来卸载驱动程序,软件可以自 动识别当前环境,完成驱动程序的卸载工作。 同时MicroDogInstdrv.exe支持命令行参数,命令行参数(不区分大小写)说明如下: /? 显示命令行帮助 /i 安装时不显示界面 /r 卸载时不显示卸载界面 /a 安装并口狗和USB狗驱动 /p 只安装或卸载并口狗驱动(需要结合/i或/r参数使用) /u 只安装或卸载USB狗驱动(需要结合/i或/r参数使用) /s 不显示任何安装和卸载信息 例: MicroDogInstdrv /i/s 安装过程中不显示任何信息

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

xiyangbaixue

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值