기존에 잘 패키징(빌드)되던 electron project가.. sqlite3를 포함했다는 이유로 안된다.
인텔 맥, Apple 실리콘 맥, 리눅스까진 잘 되는데, 윈도우에서 이슈가 발생한다.
오류는 아래 사진과 같다.
더보기
yarn run v1.22.19
warning ../../package.json: No license field
$ /Users/god-logger/apps/client/node_modules/.bin/electron-builder --config ./buildConfig_dev.json --win --x64 -p always
• electron-builder version=24.3.0 os=22.4.0
• loaded configuration file=/Users/god-logger/apps/client/buildConfig_dev.json
• writing effective config file=/Volumes/외장SSD/build/dev/builder-effective-config.yaml
• executing @electron/rebuild arch=x64 version=24.1.3 appDir=/Users/god-logger/apps/client
• packaging platform=win32 arch=x64 electron=24.1.3 appOutDir=/Volumes/외장SSD/build/dev/win-unpacked
• signing file=/Volumes/외장SSD/build/dev/win-unpacked/resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-x64/node_sqlite3.node certificateFile=/Users/god-logger/cert.pfx
• signing file=/Volumes/외장SSD/build/dev/win-unpacked/resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64/node_sqlite3.node certificateFile=/Users/god-logger/cert.pfx
• signing file=/Volumes/외장SSD/build/dev/win-unpacked/resources/app.asar.unpacked/node_modules/sqlite3/build/Release/node_sqlite3.node certificateFile=/Users/god-logger/cert.pfx
⨯ Exit code: 255. Command failed: /Users/god-logger/Library/Caches/electron-builder/winCodeSign/winCodeSign-2.6.0/darwin/10.12/osslsigncode -in /Volumes/외장SSD/build/dev/win-unpacked/resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-x64/node_sqlite3.node -out /Volumes/외장SSD/build/dev/win-unpacked/resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-x64/node_sqlite3-signed-sha1.node -t http://timestamp.digicert.com -pkcs12 /Users/god-logger/cert.pfx -h sha1 -n DataLabelTool -i https://god-logger.tistory.com -pass (sha256 hash) file type: /Volumes/외장SSD/build/dev/win-unpacked/resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-x64/node_sqlite3.node
Failed
Unrecognized file type: /Volumes/외장SSD/build/dev/win-unpacked/resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-x64/node_sqlite3.node
Failed
failedTask=build stackTrace=Error: Exit code: 255. Command failed: /Users/god-logger/Library/Caches/electron-builder/winCodeSign/winCodeSign-2.6.0/darwin/10.12/osslsigncode -in /Volumes/외장SSD/build/dev/win-unpacked/resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-x64/node_sqlite3.node -out /Volumes/외장SSD/build/dev/win-unpacked/resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-x64/node_sqlite3-signed-sha1.node -t http://timestamp.digicert.com -pkcs12 /Users/god-logger/cert.pfx -h sha1 -n DataLabelTool -i https://god-logger.tistory.com -pass (sha256 hash) file type: /Volumes/외장SSD/build/dev/win-unpacked/resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-x64/node_sqlite3.node
Failed
Unrecognized file type: /Volumes/외장SSD/build/dev/win-unpacked/resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-x64/node_sqlite3.node
Failed
at /Users/god-logger/apps/client/node_modules/builder-util/src/util.ts:133:18
at ChildProcess.exithandler (node:child_process:410:5)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Socket.<anonymous> (node:internal/child_process:458:11)
at Socket.emit (node:events:513:28)
at Pipe.<anonymous> (node:net:301:12)
From previous event:
at processImmediate (node:internal/timers:466:21)
From previous event:
at WinPackager.signApp (/Users/god-logger/apps/client/node_modules/app-builder-lib/src/winPackager.ts:407:27)
at WinPackager.doSignAfterPack (/Users/god-logger/apps/client/node_modules/app-builder-lib/src/platformPackager.ts:332:21)
at WinPackager.doPack (/Users/god-logger/apps/client/node_modules/app-builder-lib/src/platformPackager.ts:317:7)
at WinPackager.pack (/Users/god-logger/apps/client/node_modules/app-builder-lib/src/platformPackager.ts:136:5)
at Packager.doBuild (/Users/god-logger/apps/client/node_modules/app-builder-lib/src/packager.ts:442:9)
at executeFinally (/Users/god-logger/apps/client/node_modules/builder-util/src/promise.ts:12:14)
at Packager._build (/Users/god-logger/apps/client/node_modules/app-builder-lib/src/packager.ts:376:31)
at Packager.build (/Users/god-logger/apps/client/node_modules/app-builder-lib/src/packager.ts:337:12)
at executeFinally (/Users/god-logger/apps/client/node_modules/builder-util/src/promise.ts:12:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
해결법
- electron-builder [preRelease] 버전으로 업데이트 24.3.0 사용시 해결되었다는 글을 보았지만, 실패
- sqlite3, better-sqlite3 결국 내부 node_sqlite3.node 사용하는거라 실패
- 다른 방안인 nedb 사용으로 결국 변경.
반응형
'자바스크립트 > Electron Framework' 카테고리의 다른 글
Electron 클라이언트 중복 실행 방지 방법 (0) | 2023.10.06 |
---|---|
Electron VsCode 에서 Debugging(디버깅) 하는 법 (0) | 2023.09.05 |
Electron-builder Code Sign 인증 (0) | 2023.05.04 |
별도 서버를 활용한 Electron AutoUpdater 적용 (0) | 2023.04.27 |