alex8088 / electron-vite-boilerplate

Comprehensive and security Electron template (TypeScript + Vue3 + Vite).
https://electron-vite.org
147 stars 28 forks source link

On Windows run npm run build:win, result is errorOut=ERROR: Cannot create symbolic link #17

Closed wildtang closed 1 month ago

wildtang commented 1 month ago

On my Windows 10, When I tried to build windows package in PowerShell, error occured. Below is console output. It looks like to link a darwin(macOS) file which is not needed on Windows.

PowerShell 7.4.5
fnm 1.37.1
Node.js v20.17.0

PS E:\inBackup\MyCode\github.com> git clone https://github.com/alex8088/electron-vite-boilerplate.git
Cloning into 'electron-vite-boilerplate'...
remote: Enumerating objects: 200, done.
remote: Counting objects: 100% (200/200), done.
remote: Compressing objects: 100% (142/142), done.
remote: Total 200 (delta 92), reused 150 (delta 44), pack-reused 0 (from 0)
Receiving objects: 100% (200/200), 1006.81 KiB | 1.06 MiB/s, done.
Resolving deltas: 100% (92/92), done.
PS E:\inBackup\MyCode\github.com> cd .\electron-vite-boilerplate\
PS E:\inBackup\MyCode\github.com\electron-vite-boilerplate> npm install

> electron-app@1.0.0 postinstall
> electron-builder install-app-deps

  • electron-builder  version=24.9.1
  • loaded configuration  file=E:\inBackup\MyCode\github.com\electron-vite-boilerplate\electron-builder.yml

added 482 packages, and audited 483 packages in 24s

86 packages are looking for funding
  run `npm fund` for details

12 vulnerabilities (7 moderate, 5 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
PS E:\inBackup\MyCode\github.com\electron-vite-boilerplate> npm run build:win

> electron-app@1.0.0 build:win
> npm run build && electron-builder --win

> electron-app@1.0.0 build
> npm run typecheck && electron-vite build

> electron-app@1.0.0 typecheck
> npm run typecheck:node && npm run typecheck:web

> electron-app@1.0.0 typecheck:node
> tsc --noEmit -p tsconfig.node.json --composite false

> electron-app@1.0.0 typecheck:web
> vue-tsc --noEmit -p tsconfig.web.json --composite false

vite v5.0.12 building SSR bundle for production...
✓ 2 modules transformed.
out/main/bytecode-loader.cjs  2.31 kB
out/main/index.js             1.55 kB
✓ 1 bundles compiled into bytecode.
out/main/index.jsc   3.88 kB
✓ built in 1.56s
vite v5.0.12 building SSR bundle for production...
✓ 1 modules transformed.
out/preload/bytecode-loader.cjs  2.31 kB
out/preload/index.js             0.42 kB
✓ 1 bundles compiled into bytecode.
out/preload/index.jsc   0.87 kB
✓ built in 118ms
vite v5.0.12 building for production...
✓ 13 modules transformed.
../../out/renderer/index.html                      0.55 kB
../../out/renderer/assets/electron-7cFhHP7q.svg    5.82 kB
../../out/renderer/assets/index-rGzMW8hq.css       6.74 kB
../../out/renderer/assets/index-XqtFfZAe.js      159.90 kB
✓ built in 1.03s
  • electron-builder  version=24.9.1 os=10.0.19044
  • loaded configuration  file=E:\inBackup\MyCode\github.com\electron-vite-boilerplate\electron-builder.yml
  • writing effective config  file=dist\builder-effective-config.yaml
  • skipped dependencies rebuild  reason=npmRebuild is set to false
  • packaging       platform=win32 arch=x64 electron=28.2.0 appOutDir=dist\win-unpacked
  • downloading     url=https://npmmirror.com/mirrors/electron-builder-binaries/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1
  • downloaded      url=https://npmmirror.com/mirrors/electron-builder-binaries/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=1.449s
  ⨯ cannot execute  cause=exit status 2
                    out=
    7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26

    Scanning the drive for archives:
    1 file, 5635384 bytes (5504 KiB)

    Extracting archive: C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\034951879.7z
    --
    Path = C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\034951879.7z
    Type = 7z
    Physical Size = 5635384
    Headers Size = 1492
    Method = LZMA2:24m LZMA:20 BCJ2
    Solid = +
    Blocks = 2

    Sub items Errors: 2

    Archives with Errors: 1

    Sub items Errors: 2

                    errorOut=ERROR: Cannot create symbolic link : �ͻ���û����������Ȩ�� : C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\034951879\darwin\10.12\lib\libcrypto.dylib
    ERROR: Cannot create symbolic link : �ͻ���û����������Ȩ�� : C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\034951879\darwin\10.12\lib\libssl.dylib

                    command='E:\inBackup\MyCode\github.com\electron-vite-boilerplate\node_modules\7zip-bin\win\x64\7za.exe' x -bd 'C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\034951879.7z' '-oC:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\034951879'
                    workingDir=C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign
  • Above command failed, retrying 3 more times
  • downloading     url=https://npmmirror.com/mirrors/electron-builder-binaries/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1
  • downloaded      url=https://npmmirror.com/mirrors/electron-builder-binaries/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=1.373s
  ⨯ cannot execute  cause=exit status 2
                    out=
    7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26

    Scanning the drive for archives:
    1 file, 5635384 bytes (5504 KiB)

    Extracting archive: C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\503905147.7z
    --
    Path = C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\503905147.7z
    Type = 7z
    Physical Size = 5635384
    Headers Size = 1492
    Method = LZMA2:24m LZMA:20 BCJ2
    Solid = +
    Blocks = 2

    Sub items Errors: 2

    Archives with Errors: 1

    Sub items Errors: 2

                    errorOut=ERROR: Cannot create symbolic link : �ͻ���û����������Ȩ�� : C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\503905147\darwin\10.12\lib\libcrypto.dylib
    ERROR: Cannot create symbolic link : �ͻ���û����������Ȩ�� : C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\503905147\darwin\10.12\lib\libssl.dylib

                    command='E:\inBackup\MyCode\github.com\electron-vite-boilerplate\node_modules\7zip-bin\win\x64\7za.exe' x -bd 'C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\503905147.7z' '-oC:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\503905147'
                    workingDir=C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign
  • Above command failed, retrying 2 more times
  • downloading     url=https://npmmirror.com/mirrors/electron-builder-binaries/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1
  • downloaded      url=https://npmmirror.com/mirrors/electron-builder-binaries/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=1.143s
  ⨯ cannot execute  cause=exit status 2
                    out=
    7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26

    Scanning the drive for archives:
    1 file, 5635384 bytes (5504 KiB)

    Extracting archive: C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\959811327.7z
    --
    Path = C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\959811327.7z
    Type = 7z
    Physical Size = 5635384
    Headers Size = 1492
    Method = LZMA2:24m LZMA:20 BCJ2
    Solid = +
    Blocks = 2

    Sub items Errors: 2

    Archives with Errors: 1

    Sub items Errors: 2

                    errorOut=ERROR: Cannot create symbolic link : �ͻ���û����������Ȩ�� : C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\959811327\darwin\10.12\lib\libcrypto.dylib
    ERROR: Cannot create symbolic link : �ͻ���û����������Ȩ�� : C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\959811327\darwin\10.12\lib\libssl.dylib

                    command='E:\inBackup\MyCode\github.com\electron-vite-boilerplate\node_modules\7zip-bin\win\x64\7za.exe' x -bd 'C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\959811327.7z' '-oC:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\959811327'
                    workingDir=C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign
  • Above command failed, retrying 1 more times
  • downloading     url=https://npmmirror.com/mirrors/electron-builder-binaries/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1
  • downloaded      url=https://npmmirror.com/mirrors/electron-builder-binaries/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=1.333s
  ⨯ cannot execute  cause=exit status 2
                    out=
    7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26

    Scanning the drive for archives:
    1 file, 5635384 bytes (5504 KiB)

    Extracting archive: C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\914015303.7z
    --
    Path = C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\914015303.7z
    Type = 7z
    Physical Size = 5635384
    Headers Size = 1492
    Method = LZMA2:24m LZMA:20 BCJ2
    Solid = +
    Blocks = 2

    Sub items Errors: 2

    Archives with Errors: 1

    Sub items Errors: 2

                    errorOut=ERROR: Cannot create symbolic link : �ͻ���û����������Ȩ�� : C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\914015303\darwin\10.12\lib\libcrypto.dylib
    ERROR: Cannot create symbolic link : �ͻ���û����������Ȩ�� : C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\914015303\darwin\10.12\lib\libssl.dylib

                    command='E:\inBackup\MyCode\github.com\electron-vite-boilerplate\node_modules\7zip-bin\win\x64\7za.exe' x -bd 'C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\914015303.7z' '-oC:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign\914015303'
                    workingDir=C:\Users\me\AppData\Local\electron-builder\Cache\winCodeSign
  • Above command failed, retrying 0 more times
PS E:\inBackup\MyCode\github.com\electron-vite-boilerplate>
wildtang commented 1 month ago

Use Admin priviledge can resolve this problem.