NYT92 / hanimedesktop

Hanime Desktop Build With Electron + Nuxtjs + HaniAPI 🔞
https://nsdev.ml/project/hanimedesktop
GNU General Public License v3.0
11 stars 2 forks source link

How to build on MacOS? #1

Open ghost opened 2 years ago

ghost commented 2 years ago
❯ yarn install
yarn install v1.22.19
warning ../../package.json: No license field
$ node .electron-nuxt/check-engines.js
node:internal/modules/cjs/loader:959
  throw err;
  ^

Error: Cannot find module '/Users/username/Downloads/hanimedesktop/.electron-nuxt/check-engines.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Module._load (node:internal/modules/cjs/loader:804:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.7.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

how to solve error code above? Thanks a lot!

NYT92 commented 2 years ago

sorry, I forgot to include the .electron-nuxt folder which contains the build script for the app. You can try to build the app again. if there is any issue just let me know.

ghost commented 2 years ago

app was built with no specific appicon, and run well, but following error show up while building, does these matter?

I read the error code. It looks like the error is caused by the dmg-build Python script cannot find the correct Python executable. Can I consider that the creation of the DMG image failed, but the building app itself was successful?

│    • building        target=DMG arch=arm64 file=build/setup-1.1.0-beta.dmg
│
│    • Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+
│
│    ⨯ Exit code: ENOENT. spawn /usr/bin/python ENOENT  failedTask=build stackTrace=Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
│      at /Users/username/Downloads/hanimedesktop/node_modules/builder-util/src/util.ts:133:18
│      at exithandler (node:child_process:420:5)
│      at ChildProcess.errorhandler (node:child_process:432:5)
│      at ChildProcess.emit (node:events:513:28)
│      at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
│      at onErrorNT (node:internal/child_process:476:16)
│      at processTicksAndRejections (node:internal/process/task_queues:82:21)
│
│  Error: Command failed with exit code 1: electron-builder --config builder.config.js
│    • electron-builder  version=22.14.13 os=21.6.0
│    • loaded configuration  file=/Users/username/Downloads/hanimedesktop/builder.config.js
│    • packaging       platform=darwin arch=arm64 electron=16.2.4 appOutDir=build/mac-arm64
│    • default Electron icon is used  reason=application icon is not set
│    • skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible, see https://electron.build/code-signing allIdentities=  1) 4EF8457C6848106730D38B13ED14F5D745932396 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│    2) 14A7B9117CC6D8C4167D927C3D6BDC00B8450BD4 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│    3) 76D3F75332808AA2405E2F95BECB2EFABE360207 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│    4) DF448409B15531C11C201B2CF1E358B4B71392D8 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│    5) 931CD8ED3A1CED843276D4FE4D057B18BF5CD115 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│    6) 30B44EB371910E07CBF6FF3FA5CDC1E92532F130 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│    7) AB16BDF5C05A829246F6DD68704A2B770D23AE2E "localhost" (CSSMERR_TP_NOT_TRUSTED)
│    8) 1107A05D7AD1BB02D8FB6AC904601D5329703AB3 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│    9) 66A7A91C17A2B5205CE65742E0961B2FA4881F6D "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   10) 1AC1B921FF0330D57383DE17BE8226C41E94E233 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   11) ADC23EDEFD1DFBE3D907F4A0288EA3C22949927B "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   12) ECCD6E93211B4B7CAD345448B1ADEF9DA9B33DCB "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   13) CC0181DED048299075E3E762956116BA8BF5C159 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   14) 9BF8958EC20601AB354B5C85099DB2E7EF45BC66 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   15) D481C5DFFD423B320ADD02512D913644509B5DE5 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   16) 67F54F5E40CA19061110DEF3E5982B350D7A6A79 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   17) 021CAC73F861CFB612A718C4ABE9C8D73FE66547 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   18) 4BB65DB6B3045398B54D19F5C6BF90EC9D040CCB "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   19) 75E4F66F3A52390D1EBF29775C87DAB5BEECFD04 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   20) 5B73E4BBF4315E6F2D0C18A17AFFC4BBD5A6428E "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   21) 3C9AFF970C4D6DC703A1A9011B4194AC20F3C573 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   22) 5604F3FBE4524CD6D50C77145695F283D0F4A8F9 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   23) C7523AF8A8DF08785DC8A45103E3FEA61EE73D09 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   24) 7D6D4BAE2A2BB3536B7615926CF61D7817F75A08 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│   25) 2C8D26999FB3917681A44065B5048ACDD5619F65 "localhost" (CSSMERR_TP_NOT_TRUSTED)
│       25 identities found
│                                                  Valid identities only
│       0 valid identities found
│    • building        target=DMG arch=arm64 file=build/setup-1.1.0-beta.dmg
│    • Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+
│    ⨯ Exit code: ENOENT. spawn /usr/bin/python ENOENT  failedTask=build stackTrace=Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
│      at /Users/username/Downloads/hanimedesktop/node_modules/builder-util/src/util.ts:133:18
│      at exithandler (node:child_process:420:5)
│      at ChildProcess.errorhandler (node:child_process:432:5)
│      at ChildProcess.emit (node:events:513:28)
│      at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
│      at onErrorNT (node:internal/child_process:476:16)
│      at processTicksAndRejections (node:internal/process/task_queues:82:21)
│      at makeError (/Users/username/Downloads/hanimedesktop/node_modules/execa/lib/error.js:59:11)
│      at handlePromise (/Users/username/Downloads/hanimedesktop/node_modules/execa/index.js:114:26)
│      at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
│    shortMessage: 'Command failed with exit code 1: electron-builder --config builder.config.js',
│    command: 'electron-builder --config builder.config.js',
│    exitCode: 1,
│    signal: undefined,
│    signalDescription: undefined,
│    stdout: '  • electron-builder  version=22.14.13 os=21.6.0\n' +
│      '  • loaded configuration  file=/Users/username/Downloads/hanimedesktop/builder.config.js\n' +
│      '  • packaging       platform=darwin arch=arm64 electron=16.2.4 appOutDir=build/mac-arm64\n' +
│      '  • default Electron icon is used  reason=application icon is not set\n' +
│      '  • skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible, see https://electron.build/code-signing allIdentities=  1) 4EF8457C6848106730D38B13ED14F5D745932396 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      '  2) 14A7B9117CC6D8C4167D927C3D6BDC00B8450BD4 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      '  3) 76D3F75332808AA2405E2F95BECB2EFABE360207 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      '  4) DF448409B15531C11C201B2CF1E358B4B71392D8 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      '  5) 931CD8ED3A1CED843276D4FE4D057B18BF5CD115 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      '  6) 30B44EB371910E07CBF6FF3FA5CDC1E92532F130 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      '  7) AB16BDF5C05A829246F6DD68704A2B770D23AE2E "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      '  8) 1107A05D7AD1BB02D8FB6AC904601D5329703AB3 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      '  9) 66A7A91C17A2B5205CE65742E0961B2FA4881F6D "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 10) 1AC1B921FF0330D57383DE17BE8226C41E94E233 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 11) ADC23EDEFD1DFBE3D907F4A0288EA3C22949927B "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 12) ECCD6E93211B4B7CAD345448B1ADEF9DA9B33DCB "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 13) CC0181DED048299075E3E762956116BA8BF5C159 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 14) 9BF8958EC20601AB354B5C85099DB2E7EF45BC66 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 15) D481C5DFFD423B320ADD02512D913644509B5DE5 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 16) 67F54F5E40CA19061110DEF3E5982B350D7A6A79 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 17) 021CAC73F861CFB612A718C4ABE9C8D73FE66547 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 18) 4BB65DB6B3045398B54D19F5C6BF90EC9D040CCB "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 19) 75E4F66F3A52390D1EBF29775C87DAB5BEECFD04 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 20) 5B73E4BBF4315E6F2D0C18A17AFFC4BBD5A6428E "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 21) 3C9AFF970C4D6DC703A1A9011B4194AC20F3C573 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 22) 5604F3FBE4524CD6D50C77145695F283D0F4A8F9 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 23) C7523AF8A8DF08785DC8A45103E3FEA61EE73D09 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 24) 7D6D4BAE2A2BB3536B7615926CF61D7817F75A08 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      ' 25) 2C8D26999FB3917681A44065B5048ACDD5619F65 "localhost" (CSSMERR_TP_NOT_TRUSTED)\n' +
│      '     25 identities found\n' +
│      '                                                Valid identities only\n' +
│      '     0 valid identities found\n' +
│      '  • building        target=DMG arch=arm64 file=build/setup-1.1.0-beta.dmg\n' +
│      '  • Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+\n' +
│      '  ⨯ Exit code: ENOENT. spawn /usr/bin/python ENOENT  failedTask=build stackTrace=Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT\n' +
│      '    at /Users/username/Downloads/hanimedesktop/node_modules/builder-util/src/util.ts:133:18\n' +
│      '    at exithandler (node:child_process:420:5)\n' +
│      '    at ChildProcess.errorhandler (node:child_process:432:5)\n' +
│      '    at ChildProcess.emit (node:events:513:28)\n' +
│      '    at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)\n' +
│      '    at onErrorNT (node:internal/child_process:476:16)\n' +
│      '    at processTicksAndRejections (node:internal/process/task_queues:82:21)',
│    stderr: '',
│    failed: true,
│    timedOut: false,
│    isCanceled: false,
│    killed: false
│  }
│
⠇ Electron-nuxt: Building app for distribution
✖ Electron-nuxt: Error occurred when building application
PipelineError: Error occurred when building application
    at ElectronBuilder.<anonymous> (/Users/username/Downloads/hanimedesktop/node_modules/@xpda-dev/electron-builder/lib/ElectronBuilder.js:29:23)
    at Generator.throw (<anonymous>)
    at rejected (/Users/username/Downloads/hanimedesktop/node_modules/@xpda-dev/electron-builder/lib/ElectronBuilder.js:5:65)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
NYT92 commented 2 years ago

I never tested the build on a mac and have seen this error before but I think it's either caused by the electron-nuxt build script or the electron-builder itself...

ghost commented 2 years ago

after macos big sur, python3 is installed by default, and exectutable in path is named python3 instead of python. so builder cant find such module in bin folder.