新增区块链相关包后,项目在部署的时候报错,报错内容如下:
报错信息:
⨯ EPERM: operation not permitted, link
'/Users/XXX/.cache/act/be662ca67b3f7553/hostexecutor/node_modules/bigint-buffer/build/node_gyp_bins/python3'->
'/Users/XXX/.cache/act/be662ca67b3f7553/hostexecutor/release/win-unpacked/resources/app.asar.unpacked/node_modules/bigint-
buffer/build/node_gyp_bins/python3' failedTask=build stackTrace=Error: ...
报错截图:
修复:
构建版本中增加
USE_HARD_LINKS: false
部署文件内容如下,注意空格
name: 持续构建
on: [pull_request]jobs:持续构建:runs-on: macOSsteps:- name: 检出代码uses: actions/checkout@v3- name: 计算哈希uses: seepine/hash-files@v1id: get-hashwith: patterns: |-package.jsonpackage-lock.json - name: 保存缓存id: cacheuses: actions/cache@v3with:path: node_moduleskey: ChainTradeClient-${{ steps.get-hash.outputs.hash }}- name: 安装依赖if: steps.cache.outputs.cache-hit != 'true'run: npm i --registry=http://registry.npmmirror.com- name: 单元测试run: npm run test- name: 构建版本env:# no hardlinks so dependencies are copiedUSE_HARD_LINKS: falserun: npm run build-win
参考:
https://github.com/TypeStrong/ts-node/issues/422