mjangir / reactron

A full featured and highly scalable electron-react boilerplate
39 stars 15 forks source link

npm run package failed #3

Closed PitterL closed 5 years ago

PitterL commented 5 years ago

Hi, mjangir: Nice to see you. I download the reactron and test the pack command "npm run package", it's working for your default project. Then i want to add more features, so i add the package yarn add semantic-ui-react yarn add semantic-ui-css and som of my own code in APP folder. It's working with "npm run dev". But when i want to pack it, there is always fail, the log looks like this

========================== D:\Users\,,,\vscode\js\reactron>npm run package

reactron@1.0.0 package D:\Users\,,,\vscode\js\reactron npm run release:clean && npm run build && build --publish never

reactron@1.0.0 release:clean D:\Users\,,,\vscode\js\reactron rimraf ./release

reactron@1.0.0 prebuild D:\Users\,,,\vscode\js\reactron npm run build:clean

reactron@1.0.0 build:clean D:\Users\,,,\vscode\js\reactron rimraf ./app/build

reactron@1.0.0 build D:\Users\,,,\vscode\js\reactron concurrently "npm run build:main" "npm run build:renderer"

[0] [0] > reactron@1.0.0 build:main D:\Users\,,,\vscode\js\reactron [0] > cross-env NODE_ENV=production BABEL_ENV=electron node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config internals/webpack/webpack.main.prod.js --colors [0] [1] [1] > reactron@1.0.0 build:renderer D:\Users\,,,\vscode\js\reactron [1] > cross-env NODE_ENV=production BABEL_ENV=electron node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config internals/webpack/webpack.prod.babel.js --colors [1] [0] Hash: ed863b3cc9e38fcbe5d9 [0] Version: webpack 4.12.0 [0] Time: 2412ms [0] Built at: 12/03/2018 8:56:58 AM [0] Asset Size Chunks Chunk Names [0] ./main.prod.js 110 KiB 0 [emitted] main [0] ./main.prod.js.map 467 KiB 0 [emitted] main [0] [0] external "path" 42 bytes {0} [built] [0] [1] external "fs" 42 bytes {0} [built] [0] [2] external "electron" 42 bytes {0} [built] [0] [4] external "electron-is-dev" 42 bytes {0} [built] [0] [8] external "electron-settings" 42 bytes {0} [built] [0] [17] external "module" 42 bytes {0} [built] [0] [21] ./app/electron/autoupdater.js 3.85 KiB {0} [built] [0] [56] external "@sentry/electron" 42 bytes {0} [built] [0] [57] ./app/utils/electronSentryUtil.js 617 bytes {0} [built] [0] [58] external "auto-launch" 42 bytes {0} [built] [0] [59] ./app/electron/startup.js 1.33 KiB {0} [built] [0] [61] external "electron-updater" 42 bytes {0} [built] [0] [62] ./app/electron/menu.js 5.39 KiB {0} [built] [0] [63] external "electron-window-state" 42 bytes {0} [built] [0] [64] ./app/electron/main.dev.js 8.69 KiB {0} [built] [0] + 50 hidden modules [0] [0] WARNING in ./node_modules/electron-debug/index.js 101:45-58 [0] Critical dependency: the request of a dependency is an expression [0] @ ./app/electron/main.dev.js [0] [0] WARNING in ./node_modules/electron-debug/index.js 102:61-74 [0] Critical dependency: the request of a dependency is an expression [0] @ ./app/electron/main.dev.js [0] npm run build:main exited with code 0 [1] Hash: 5ee2b0f1cf7bc5a676d1 [1] Version: webpack 4.12.0 [1] Time: 22775ms [1] Built at: 12/03/2018 8:57:19 AM [1] Asset Size Chunks Chunk Names [1] 1.23da5b9dda291a3d233b.chunk.js 3.65 KiB 1 [emitted] [1] b87b9ba532ace76ae9f6edfe9f72ded2.ttf 103 KiB [emitted] [1] 8e3c7f5520f5ae906c6cf6d7f3ddcd19.eot 104 KiB [emitted] [1] faff92145777a3cbaf8e7367b4807987.woff 49.3 KiB [emitted] [1] 701ae6abd4719e9c2ada3535a497b341.eot 30.4 KiB [emitted] [1] c5ebe0b32dc1b5cc449a76c4204d13bb.ttf 96.1 KiB [emitted] [1] 13db00b7a34fee4d819ab7f9838cc428.eot 96.3 KiB [emitted] [1] .htaccess.bin 1.8 KiB [emitted] [1] cd6c777f1945164224dee082abaea03a.woff2 12 KiB [emitted] [1] a1a749e89f578a49306ec2b055c073da.svg 496 KiB [emitted] [big] [1] favicon.ico 361 KiB [emitted] [1] 9c74e172f87984c48ddf5c8108cabe67.png 27.5 KiB [emitted] [1] ad97afd3337e8cda302d10ff5a4026b8.ttf 30.2 KiB [emitted] [1] ef60a4f6c25ef7f39f2d25a748dbecfe.woff 14.4 KiB [emitted] [1] 2f1a976c9c35ffed9b7e23cf2cbf8f19.jpg 201 KiB [emitted] [1] a046592bac8f2fd96e994733faf3858c.woff 62.2 KiB [emitted] [1] e8c322de9658cbeb8a774b6624167c2c.woff2 53.2 KiB [emitted] [1] 82f60bd0b94a1ed68b1e6e309ce2e8c3.svg 105 KiB [emitted] [1] 962a1bf31c081691065fe333d9fa8105.svg 382 KiB [emitted] [big] [1] 0.952130e192c0a78fe0fa.chunk.js 863 KiB 0 [emitted] [big] [1] 0ab54153eeeca0ce03978cc463b257f7.woff2 39.2 KiB [emitted] [1] 2.6dee619e81ce84541a07.chunk.js 1.02 KiB 2 [emitted] [1] 3.52d7847d70ce196b591a.chunk.js 23.8 KiB 3 [emitted] [1] 4.9ea623b39595c318f09d.chunk.js 23.6 KiB 4 [emitted] [1] runtime~main.9fbd0eaad62b9b92e0fb.js 2.29 KiB 5 [emitted] runtime~main [1] vendors~main.2f6cc107b76dd5abcb3d.chunk.js 1.67 MiB 6 [emitted] [big] vendors~main [1] main.473f0c6a0c72a2b60df8.chunk.js 278 KiB 7 [emitted] main [1] index.html 1.26 KiB [emitted] [1] sw.js 18.9 KiB [emitted] [1] manifest.d0296b920805b2768fa23f7fadc7374c.json 1.69 KiB [emitted] [1] icon_512x512.dc20f8a86234c4a7a0b08d5cffff9d4d.png 43.3 KiB [emitted] [1] icon_384x384.f2d8221e40ea55159668a02741826386.png 40.3 KiB [emitted] [1] icon_192x192.9aeb7f7081bf5316fa2c57b439bffdbe.png 18.4 KiB [emitted] [1] icon_180x180.33285f999db78beed5640085c051e7b1.png 17.4 KiB [emitted] [1] icon_167x167.9085aba6ea24073fba72a94b7ac731a1.png 15.8 KiB [emitted] [1] icon_152x152.80d43cecdc663299328632b85127117b.png 14.2 KiB [emitted] [1] icon_144x144.f2f644149d1ca21bccb120d44e79c824.png 13.3 KiB [emitted] [1] icon_128x128.e76c240129e3d6ee2eb7df8f1e9c7b0f.png 10.7 KiB [emitted] [1] icon_120x120.2f7752bee9dcd06e998fd44640e47485.png 11 KiB [emitted] [1] icon_96x96.e26d703c83c9b5844bb4f58c397f4bf2.png 8.46 KiB [emitted] [1] icon_72x72.0880a778e8031d3cb721b64c1c1059a7.png 6.05 KiB [emitted] [1] [063ddd4fe3a5ed5f1bb8] ./app/containers/NotFoundPage/Loadable.js 612 bytes {7} [built] [1] [0785de3f40b134973d35] ./app/i18n.js 1.59 KiB {7} [built] [1] [1283171292070762fea8] ./app/configureStore.js 2.19 KiB {7} [built] [1] [491cc2e27aa2b4221847] ./app/reducers.js 2.29 KiB {7} [built] [1] [bfa93fc63e81b5f72415] ./app/containers/MaxtouchPage/desk/index.js 4.29 KiB {7} [built] [1] [0] multi ./app/app.js 28 bytes {7} [built] [1] [4ce54d943eb1f3decabb] ./node_modules/file-loader/dist/cjs.js?name=[name].[ext]!./app/.htaccess 59 bytes {7} [built] [1] [6c925591d78ad1124781] ./app/containers/App/index.js 2.71 KiB {7} [built] [1] [6cbaae35658a59059130] ./app/containers/LanguageProvider/index.js 1.52 KiB {7} [built] [1] [74431d47afb6248fcb69] ./node_modules/redux-saga/es/index.js + 15 modules 60.9 KiB {6} [built] [1] | 16 modules [1] [7dd68a64079d1d4cd439] ./app/translations/en.json 3.28 KiB {7} [built] [1] [7fa3d1d0596e1f2a0f74] ./app/global-styles.js 571 bytes {7} [built] [1] [8b703812aa8ae3c41814] ./app/app.js 3.63 KiB {7} [built] [1] [9c6be9f00377ac8be3d8] ./node_modules/file-loader/dist/cjs.js?name=[name].[ext]!./app/images/favicon.ico 57 bytes {7} [built] [1] [ab039aecd4a1d4fedc0e] ./node_modules/react-intl/lib/index.es.js + 14 modules 124 KiB {6} [built] [1] | 15 modules [1] + 714 hidden modules [1] [1] WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). [1] This can impact web performance. [1] Assets: [1] a1a749e89f578a49306ec2b055c073da.svg (496 KiB) [1] 962a1bf31c081691065fe333d9fa8105.svg (382 KiB) [1] 0.952130e192c0a78fe0fa.chunk.js (863 KiB) [1] vendors~main.2f6cc107b76dd5abcb3d.chunk.js (1.67 MiB) [1] [1] WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. [1] Entrypoints: [1] main (1.67 MiB) [1] runtime~main.9fbd0eaad62b9b92e0fb.js [1] vendors~main.2f6cc107b76dd5abcb3d.chunk.js [1] [1] Child __offline_serviceworker: [1] 1 asset [1] 3 modules [1] Child html-webpack-plugin for "index.html": [1] 1 asset [1] [798c46fd90a016ad8d48] ./node_modules/html-webpack-plugin/lib/loader.js!./app/index.html 1.77 KiB {0} [built] [1] npm run build:renderer exited with code 0 • electron-builder version=20.38.2 • loaded configuration file=package.json ("build" field) At least electron-updater 4.0.0 is recommended by current electron-builder version. Please set electron-updater version to "^4.0.0" npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! reactron@1.0.0 package: npm run release:clean && npm run build && build --publish never npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the reactron@1.0.0 package script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\,,,\AppData\Roaming\npm-cache_logs\2018-12-03T00_57_20_974Z-debug.log

PitterL commented 5 years ago

2018-12-03T00_57_20_974Z-debug.log:

0 info it worked if it ends with ok 1 verbose cli [ 'D:\Program Files\nodejs\node.exe', 1 verbose cli 'D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'package' ] 2 info using npm@6.1.0 3 info using node@v10.5.0 4 verbose run-script [ 'prepackage', 'package', 'postpackage' ] 5 info lifecycle reactron@1.0.0~prepackage: reactron@1.0.0 6 info lifecycle reactron@1.0.0~package: reactron@1.0.0 7 verbose lifecycle reactron@1.0.0~package: unsafe-perm in lifecycle true 8 verbose lifecycle reactron@1.0.0~package: PATH: D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\Users\,,,\vscode\js\reactron\node_modules.bin;C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Enterprise Vault\EVClient\;D:\temp\python\Anaconda3.6;D:\temp\python\Anaconda3.6\Library\bin;D:\temp\python\Anaconda3.6\Scripts;D:\temp\python\Anaconda2.7;D:\temp\python\Anaconda2.7\Library\bin;D:\temp\python\Anaconda2.7\Scripts;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\MATLAB\MATLAB Compiler Runtime\v84\runtime\win64;d:\Program Files (x86)\Bazaar;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;D:\Program Files\nodejs\;D:\temp\MinGW\bin;C:\WINDOWS\System32\OpenSSH\;D:\temp\grep;;d:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Program Files\Keysight\IO Libraries Suite\bin;C:\Program Files\IVI Foundation\VISA\Win64\ktvisa;C:\Program Files (x86)\Keysight\IO Libraries Suite\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\ktvisa;C:\Program Files (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\Program Files (x86)\IVI Foundation\VISA\winnt\agvisa;D:\Program Files (x86)\Yarn\bin\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\,,,\AppData\Local\Microsoft\WindowsApps;d:\Users\,,,\AppData\Local\Programs\Fiddler;d:\Program Files\Microsoft VS Code\bin;C:\Users\,,,\AppData\Roaming\npm;C:\Users\,,,\AppData\Local\Microsoft\WindowsApps;C:\Users\,,,\AppData\Local\atom\bin;D:\trunk\tools\adb_1;C:\Users\,,,\AppData\Local\Yarn\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\ 9 verbose lifecycle reactron@1.0.0~package: CWD: D:\Users\,,,\vscode\js\reactron 10 silly lifecycle reactron@1.0.0~package: Args: [ '/d /s /c', 10 silly lifecycle 'npm run release:clean && npm run build && build --publish never' ] 11 silly lifecycle reactron@1.0.0~package: Returned: code: 1 signal: null 12 info lifecycle reactron@1.0.0~package: Failed to exec package script 13 verbose stack Error: reactron@1.0.0 package: npm run release:clean && npm run build && build --publish never 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16) 13 verbose stack at EventEmitter.emit (events.js:182:13) 13 verbose stack at ChildProcess. (D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:182:13) 13 verbose stack at maybeClose (internal/child_process.js:961:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5) 14 verbose pkgid reactron@1.0.0 15 verbose cwd D:\Users\,,,\vscode\js\reactron 16 verbose Windows_NT 10.0.17134 17 verbose argv "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "package" 18 verbose node v10.5.0 19 verbose npm v6.1.0 20 error code ELIFECYCLE 21 error errno 1 22 error reactron@1.0.0 package: npm run release:clean && npm run build && build --publish never 22 error Exit status 1 23 error Failed at the reactron@1.0.0 package script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

PitterL commented 5 years ago

Could you please show some help, thanks

mjangir commented 5 years ago

Probably its happening due to npm run release:clean because the release directory may be in use and its trying to delete it but I'm not sure. You can try removing the command npm run release:clean from package script and check. Removing this will not harm you BTW as it will just replace the old packaged files with new.

PitterL commented 5 years ago

Hi, Mjangir: I removed the "npm run release:clean", it look similar. Do you have manual command to run the package? I tried the "npm run build && build --publish never", but it's shown not correct command. Thanks.

======================================================= 0 info it worked if it ends with ok 1 verbose cli [ 'D:\Program Files\nodejs\node.exe', 1 verbose cli 'D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'package' ] 2 info using npm@6.1.0 3 info using node@v10.5.0 4 verbose run-script [ 'prepackage', 'package', 'postpackage' ] 5 info lifecycle reactron@1.0.0~prepackage: reactron@1.0.0 6 info lifecycle reactron@1.0.0~package: reactron@1.0.0 7 verbose lifecycle reactron@1.0.0~package: unsafe-perm in lifecycle true 8 verbose lifecycle reactron@1.0.0~package: PATH: D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\Users...\vscode\js\reactron\node_modules.bin;C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Enterprise Vault\EVClient\;D:\temp\python\Anaconda3.6;D:\temp\python\Anaconda3.6\Library\bin;D:\temp\python\Anaconda3.6\Scripts;D:\temp\python\Anaconda2.7;D:\temp\python\Anaconda2.7\Library\bin;D:\temp\python\Anaconda2.7\Scripts;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\MATLAB\MATLAB Compiler Runtime\v84\runtime\win64;d:\Program Files (x86)\Bazaar;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;D:\Program Files\nodejs\;D:\temp\MinGW\bin;C:\WINDOWS\System32\OpenSSH\;D:\temp\grep;;d:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Program Files\Keysight\IO Libraries Suite\bin;C:\Program Files\IVI Foundation\VISA\Win64\ktvisa;C:\Program Files (x86)\Keysight\IO Libraries Suite\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\ktvisa;C:\Program Files (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\Program Files (x86)\IVI Foundation\VISA\winnt\agvisa;D:\Program Files (x86)\Yarn\bin\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users...\AppData\Local\Microsoft\WindowsApps;d:\Users...\AppData\Local\Programs\Fiddler;d:\Program Files\Microsoft VS Code\bin;C:\Users...\AppData\Roaming\npm;C:\Users...\AppData\Local\Microsoft\WindowsApps;C:\Users...\AppData\Local\atom\bin;D:\trunk\tools\adb_1;C:\Users...\AppData\Local\Yarn\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\ 9 verbose lifecycle reactron@1.0.0~package: CWD: D:\Users...\vscode\js\reactron 10 silly lifecycle reactron@1.0.0~package: Args: [ '/d /s /c', 'npm run build && build --publish never' ] 11 silly lifecycle reactron@1.0.0~package: Returned: code: 1 signal: null 12 info lifecycle reactron@1.0.0~package: Failed to exec package script 13 verbose stack Error: reactron@1.0.0 package: npm run build && build --publish never 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16) 13 verbose stack at EventEmitter.emit (events.js:182:13) 13 verbose stack at ChildProcess. (D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:182:13) 13 verbose stack at maybeClose (internal/child_process.js:961:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5) 14 verbose pkgid reactron@1.0.0 15 verbose cwd D:\Users...\vscode\js\reactron 16 verbose Windows_NT 10.0.17134 17 verbose argv "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "package" 18 verbose node v10.5.0 19 verbose npm v6.1.0 20 error code ELIFECYCLE 21 error errno 1 22 error reactron@1.0.0 package: npm run build && build --publish never 22 error Exit status 1 23 error Failed at the reactron@1.0.0 package script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]