Open ifc-fedev opened 4 years ago
macbook我也碰到这个问题,请问有解决的吗?
I had the same problem. Node version: v10.15.3 / v12.14.1 / v8.0.0 NPM version: 6.4.1 / 6.13.4 / 5.0.0 vue-cli version: 4.1.2 Operating System: Mac OS 10.15.2
npm i electron-builder@latest -S worked for me
Upgraded project to latest electron-builder and it worked.
yarn add electron-builder
i meet the same wrong. just upgrade your electron-builder version. i upgraded to 22.9.1 and it works for me.
Found an issue or bug with electron-vue? Tell me all about it!
when I run yarn run build, there have a issue
Describe the issue / bug.
Hash: 29964f4531ee274a6fd6 Version: webpack 4.41.4 Time: 757ms Built at: 2019/12/27 下午3:51:58 Asset Size Chunks Chunk Names main.js 1.44 KiB 0 [emitted] main Entrypoint main = main.js [0] external "electron" 42 bytes {0} [built] [1] ./src/main/index.js 786 bytes {0} [built] [2] external "path" 42 bytes {0} [built]
Hash: 5b8551eb9dc77919e7bb Version: webpack 4.41.4 Time: 5923ms Built at: 2019/12/27 下午3:52:03 Asset Size Chunks Chunk Names imgs/logo--assets.png 60.4 KiB [emitted]
index.html 318 bytes [emitted]
renderer.js 114 KiB 0 [emitted] renderer Entrypoint renderer = renderer.js [0] ./node_modules/_vue-loader@15.8.3@vue-loader/lib/runtime/componentNormalizer.js 2.63 KiB {0} [built] [1] ./node_modules/_vue-style-loader@4.1.2@vue-style-loader!./node_modules/_css-loader@0.28.11@css-loader!./node_modules/_vue-loader@15.8.3@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/_vue-loader@15.8.3@vue-loader/lib??vue-loader-options!./src/renderer/App.vue?vue&type=style&index=0&lang=css& 690 bytes {0} [built] [3] ./node_modules/_vue-style-loader@4.1.2@vue-style-loader!./node_modules/_css-loader@0.28.11@css-loader!./node_modules/_vue-loader@15.8.3@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/_vue-loader@15.8.3@vue-loader/lib??vue-loader-options!./src/renderer/components/LandingPage.vue?vue&type=style&index=0&lang=css& 710 bytes {0} [built] [5] ./node_modules/_vue-style-loader@4.1.2@vue-style-loader/lib/addStylesClient.js + 1 modules 6.71 KiB {0} [built] | ./node_modules/_vue-style-loader@4.1.2@vue-style-loader/lib/addStylesClient.js 6.09 KiB [built] | ./node_modules/_vue-style-loader@4.1.2@vue-style-loader/lib/listToStyles.js 637 bytes [built] [6] ./src/renderer/store/modules/index.js 238 bytes {0} [built] [7] external "vue-router" 42 bytes {0} [built] [8] external "vuex" 42 bytes {0} [built] [9] external "vuex-electron" 42 bytes {0} [built] [10] external "axios" 42 bytes {0} [built] [11] ./src/renderer/App.vue?vue&type=style&index=0&lang=css& 724 bytes {0} [built] [18] ./src/renderer/components/LandingPage.vue?vue&type=style&index=0&lang=css& 764 bytes {0} [built] [20] ./src/renderer/store/modules sync nonrecursive .js$ 192 bytes {0} [built] [22] external "vue-electron" 42 bytes {0} [built] [23] ./src/renderer/components/LandingPage.vue + 9 modules 5.82 KiB {0} [built] | ./src/renderer/components/LandingPage.vue 564 bytes [built] | ./src/renderer/components/LandingPage.vue?vue&type=template&id=d52715ae& 253 bytes [built] | ./src/renderer/components/LandingPage.vue?vue&type=script&lang=js& 450 bytes [built] | ./node_modules/_vue-loader@15.8.3@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_vue-loader@15.8.3@vue-loader/lib??vue-loader-options!./src/renderer/components/LandingPage.vue?vue&type=template&id=d52715ae& 1.42 KiB [built] | ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@15.8.3@vue-loader/lib??vue-loader-options!./src/renderer/components/LandingPage.vue?vue&type=script&lang=js& 269 bytes [built] | ./src/renderer/components/LandingPage/SystemInformation.vue 633 bytes [built] | ./src/renderer/components/LandingPage/SystemInformation.vue?vue&type=template&id=13129888&scoped=true& 277 bytes [built] | ./src/renderer/components/LandingPage/SystemInformation.vue?vue&type=script&lang=js& 474 bytes [built] | ./node_modules/_vue-loader@15.8.3@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_vue-loader@15.8.3@vue-loader/lib??vue-loader-options!./src/renderer/components/LandingPage/SystemInformation.vue?vue&type=template&id=13129888&scoped=true& 1.24 KiB [built] | ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@15.8.3@vue-loader/lib??vue-loader-options!./src/renderer/components/LandingPage/SystemInformation.vue?vue&type=script&lang=js& 298 bytes [built] [24] ./src/renderer/main.js + 8 modules 321 KiB {0} [built] | ./src/renderer/main.js 382 bytes [built] | ./node_modules/_vue@2.6.11@vue/dist/vue.esm.js 319 KiB [built] | ./src/renderer/App.vue 529 bytes [built] | ./src/renderer/router/index.js 264 bytes [built] | ./src/renderer/store/index.js 342 bytes [built] | ./src/renderer/App.vue?vue&type=template&id=933ae842& 239 bytes [built] | ./src/renderer/App.vue?vue&type=script&lang=js& 422 bytes [built] | ./node_modules/_vue-loader@15.8.3@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_vue-loader@15.8.3@vue-loader/lib??vue-loader-options!./src/renderer/App.vue?vue&type=template&id=933ae842& 210 bytes [built] | ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@15.8.3@vue-loader/lib??vue-loader-options!./src/renderer/App.vue?vue&type=script&lang=js& 45 bytes [built]
10 hidden modules Child html-webpack-plugin for "index.html": Asset Size Chunks Chunk Names index.html 533 KiB 0
Entrypoint undefined = index.html [0] ./node_modules/_html-webpack-plugin@3.2.0@html-webpack-plugin/lib/loader.js!./src/index.ejs 1.17 KiB {0} [built] [1] ./node_modules/_lodash@4.17.15@lodash/lodash.js 528 KiB {0} [built] [2] (webpack)/buildin/module.js 497 bytes {0} [built]
OKAY take it away
electron-builder
• electron-builder version=20.44.4 • loaded configuration file=package.json ("build" field) • writing effective config file=build/builder-effective-config.yaml • no native production dependencies • packaging platform=darwin arch=x64 electron=2.0.18 appOutDir=build/mac • skipped macOS application code signing reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, see https://electron.build/code-signing allIdentities= 0 identities found
• building target=macOS zip arch=x64 file=build/electron-demo-0.0.1-mac.zip • building target=DMG arch=x64 file=build/electron-demo-0.0.1.dmg • building embedded block map file=build/electron-demo-0.0.1-mac.zip Error: Exit code: 2. Command failed: /usr/bin/perl /private/var/folders/ms/478c3jbx313138h2f5_rhjzc0000gn/T/t-4TSxPk/1-dmgProperties.pl Can't locate Mac/Memory.pm in @INC (you may need to install the Mac::Memory module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /private/var/folders/ms/478c3jbx313138h2f5_rhjzc0000gn/T/t-4TSxPk/1-dmgProperties.pl line 4. BEGIN failed--compilation aborted at /private/var/folders/ms/478c3jbx313138h2f5_rhjzc0000gn/T/t-4TSxPk/1-dmgProperties.pl line 4.
Can't locate Mac/Memory.pm in @INC (you may need to install the Mac::Memory module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /private/var/folders/ms/478c3jbx313138h2f5_rhjzc0000gn/T/t-4TSxPk/1-dmgProperties.pl line 4. BEGIN failed--compilation aborted at /private/var/folders/ms/478c3jbx313138h2f5_rhjzc0000gn/T/t-4TSxPk/1-dmgProperties.pl line 4.
From previous event: at Promise.longStackTracesCaptureStackTrace [as _captureStackTrace] (/Users/huangtao/project/electronDemo/node_modules/_bluebird@3.7.2@bluebird/js/release/debuggability.js:482:19) at new PromiseSpawn (/Users/huangtao/project/electronDemo/node_modules/_bluebird@3.7.2@bluebird/js/release/generators.js:43:17) at /Users/huangtao/project/electronDemo/node_modules/_bluebird@3.7.2@bluebird/js/release/generators.js:197:21 at Packager.build (/Users/huangtao/project/electronDemo/node_modules/_app-builder-lib@20.44.4@app-builder-lib/src/packager.ts:288:14) at build (/Users/huangtao/project/electronDemo/node_modules/_app-builder-lib@20.44.4@app-builder-lib/src/index.ts:59:28) at build (/Users/huangtao/project/electronDemo/node_modules/_electron-builder@20.44.4@electron-builder/src/builder.ts:228:10) at /Users/huangtao/project/electronDemo/node_modules/_electron-builder@20.44.4@electron-builder/src/cli/cli.ts:49:19 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
How can I reproduce this problem?
#
If visual, provide a screenshot.
#
Tell me about your development environment.
If you are looking to suggest an enhancement or feature, then feel free to remove everything above.