{"id":22677830,"url":"https://github.com/leask/webpack-electron-main-demo","last_synced_at":"2025-09-19T18:44:14.428Z","repository":{"id":150323471,"uuid":"328741006","full_name":"Leask/webpack-electron-main-demo","owner":"Leask","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-11T17:51:43.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-04T13:43:50.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Leask.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-11T17:28:14.000Z","updated_at":"2022-07-11T03:32:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"907916d1-c34c-4700-8bf5-a4d76c65dd6b","html_url":"https://github.com/Leask/webpack-electron-main-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leask%2Fwebpack-electron-main-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leask%2Fwebpack-electron-main-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leask%2Fwebpack-electron-main-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leask%2Fwebpack-electron-main-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Leask","download_url":"https://codeload.github.com/Leask/webpack-electron-main-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246187218,"owners_count":20737459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-09T18:02:29.669Z","updated_at":"2025-09-19T18:44:14.304Z","avatar_url":"https://github.com/Leask.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"测试 eletron-main 打包。\n\n安装依赖: `yarn install`\n\n## 对照组：用 uuid 简单测试一下打包功能\n\n1. 运行 `node uuid`，正常打印结果\n2. 运行 `yarn pack:uuid`，生成了文件 `./dist/uuid.output.js`\n3. 测试打包的结果：`node ./dist/uuid.output.js`\n4. 正常打印结果，说明打包功能是没问题\n\n## 实验组：打包 prs-atm\n\n1. 运行 `node prs-atm`，正常打印结果\n2. 运行 `yarn pack:prs-atm`\n3. 报错了，日志如下：\n\n```\nyarn run v1.22.5\n$ webpack --config webpack.config.prs-atm.js\nassets by status 6.6 MiB [cached] 1 asset\norphan modules 399 KiB [orphan] 264 modules\nruntime modules 1.49 KiB 8 modules\njavascript modules 18.3 MiB\n  cacheable modules 18.3 MiB 2447 modules\n  36 modules\njson modules 514 KiB\n  modules by path ./node_modules/har-schema/lib/*.json 6.93 KiB 18 modules\n  modules by path ./node_modules/raw-body/node_modules/iconv-lite/encodings/tables/*.json 86.7 KiB 8 modules\n  modules by path ./node_modules/iconv-lite/encodings/tables/*.json 86.7 KiB 8 modules\n  modules by path ./node_modules/ajv/lib/refs/*.json 5.58 KiB 3 modules\n  modules by path ./node_modules/node-mailjet/*.json 1.09 KiB\n    ./node_modules/node-mailjet/package.json 1020 bytes [built] [code generated]\n    ./node_modules/node-mailjet/config.json 105 bytes [built] [code generated]\n\nWARNING in ./node_modules/bytebuffer/dist/bytebuffer-node.js 29:38-55\nModule not found: Error: Can't resolve 'memcpy' in '/Users/raimonfuns/projects/webpack-electron-main-demo/node_modules/bytebuffer/dist'\n @ ./node_modules/eosjs-ecc/lib/aes.js 5:17-38\n @ ./node_modules/eosjs-ecc/lib/api_common.js 3:10-26\n @ ./node_modules/eosjs-ecc/lib/index.js 3:16-39\n @ ./node_modules/sushitrain/index.js 11:0-49\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nWARNING in ./node_modules/formidable/lib/file.js 1:43-50\nCritical dependency: require function is used in a way in which dependencies cannot be statically extracted\n @ ./node_modules/formidable/lib/incoming_form.js 7:11-28\n @ ./node_modules/formidable/lib/index.js 1:19-58\n @ ./node_modules/superagent/lib/node/index.js 8:19-40\n @ ./node_modules/node-mailjet/mailjet-client.js 41:16-37\n @ ./node_modules/node-mailjet/index.js 1:14-41\n @ ./node_modules/utilitas/index.js 15:13-36\n @ ./node_modules/sushitrain/index.js 6:0-36\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nWARNING in ./node_modules/formidable/lib/incoming_form.js 1:43-50\nCritical dependency: require function is used in a way in which dependencies cannot be statically extracted\n @ ./node_modules/formidable/lib/index.js 1:19-58\n @ ./node_modules/superagent/lib/node/index.js 8:19-40\n @ ./node_modules/node-mailjet/mailjet-client.js 41:16-37\n @ ./node_modules/node-mailjet/index.js 1:14-41\n @ ./node_modules/utilitas/index.js 15:13-36\n @ ./node_modules/sushitrain/index.js 6:0-36\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nWARNING in ./node_modules/formidable/lib/json_parser.js 1:43-50\nCritical dependency: require function is used in a way in which dependencies cannot be statically extracted\n @ ./node_modules/formidable/lib/incoming_form.js 11:17-52\n @ ./node_modules/formidable/lib/index.js 1:19-58\n @ ./node_modules/superagent/lib/node/index.js 8:19-40\n @ ./node_modules/node-mailjet/mailjet-client.js 41:16-37\n @ ./node_modules/node-mailjet/index.js 1:14-41\n @ ./node_modules/utilitas/index.js 15:13-36\n @ ./node_modules/sushitrain/index.js 6:0-36\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nWARNING in ./node_modules/formidable/lib/querystring_parser.js 1:43-50\nCritical dependency: require function is used in a way in which dependencies cannot be statically extracted\n @ ./node_modules/formidable/lib/incoming_form.js 9:24-73\n @ ./node_modules/formidable/lib/index.js 1:19-58\n @ ./node_modules/superagent/lib/node/index.js 8:19-40\n @ ./node_modules/node-mailjet/mailjet-client.js 41:16-37\n @ ./node_modules/node-mailjet/index.js 1:14-41\n @ ./node_modules/utilitas/index.js 15:13-36\n @ ./node_modules/sushitrain/index.js 6:0-36\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nWARNING in ./node_modules/got/source/request-as-event-emitter.js 72:18-25\nCritical dependency: require function is used in a way in which dependencies cannot be statically extracted\n @ ./node_modules/got/source/as-stream.js 4:30-67\n @ ./node_modules/got/source/create.js 3:17-39\n @ ./node_modules/got/source/index.js 3:15-34\n @ ./node_modules/public-ip/index.js 5:32-46\n @ ./node_modules/utilitas/index.js 19:14-34\n @ ./node_modules/sushitrain/index.js 6:0-36\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nWARNING in ./node_modules/keyv/src/index.js 18:14-40\nCritical dependency: the request of a dependency is an expression\n @ ./node_modules/cacheable-request/src/index.js 11:13-28\n @ ./node_modules/got/source/request-as-event-emitter.js 8:25-53\n @ ./node_modules/got/source/as-stream.js 4:30-67\n @ ./node_modules/got/source/create.js 3:17-39\n @ ./node_modules/got/source/index.js 3:15-34\n @ ./node_modules/public-ip/index.js 5:32-46\n @ ./node_modules/utilitas/index.js 19:14-34\n @ ./node_modules/sushitrain/index.js 6:0-36\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nWARNING in ./node_modules/mysql2/lib/helpers.js 28:16-45\nModule not found: Error: Can't resolve 'cardinal' in '/Users/raimonfuns/projects/webpack-electron-main-demo/node_modules/mysql2/lib'\n @ ./node_modules/mysql2/lib/parsers/binary_parser.js 6:16-37\n @ ./node_modules/mysql2/lib/commands/execute.js 7:24-62\n @ ./node_modules/mysql2/lib/commands/index.js 8:16-39\n @ ./node_modules/mysql2/lib/connection.js 14:17-47\n @ ./node_modules/mysql2/index.js 5:19-49\n @ ./node_modules/mysql2/promise.js 3:13-34\n @ ./node_modules/utilitas/index.js 17:11-36\n @ ./node_modules/sushitrain/index.js 6:0-36\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nWARNING in ./node_modules/prs-atm/index.js 16:10-43\nCritical dependency: the request of a dependency is an expression\n @ ./prs-atm.js 1:15-33\n\nWARNING in ./node_modules/sushitrain/index.js 23:10-43\nCritical dependency: the request of a dependency is an expression\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nWARNING in ./node_modules/utilitas/index.js 34:10-43\nCritical dependency: the request of a dependency is an expression\n @ ./node_modules/sushitrain/index.js 6:0-36\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nWARNING in ./node_modules/ws/lib/buffer-util.js 105:21-42\nModule not found: Error: Can't resolve 'bufferutil' in '/Users/raimonfuns/projects/webpack-electron-main-demo/node_modules/ws/lib'\n @ ./node_modules/ws/lib/receiver.js 12:42-66\n @ ./node_modules/ws/index.js 7:21-46\n @ ./node_modules/sushitrain/index.js 14:0-36\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nWARNING in ./node_modules/ws/lib/validation.js 4:22-47\nModule not found: Error: Can't resolve 'utf-8-validate' in '/Users/raimonfuns/projects/webpack-electron-main-demo/node_modules/ws/lib'\n @ ./node_modules/ws/lib/receiver.js 13:43-66\n @ ./node_modules/ws/index.js 7:21-46\n @ ./node_modules/sushitrain/index.js 14:0-36\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nERROR in ./node_modules/pg/lib/native/client.js 4:13-33\nModule not found: Error: Can't resolve 'pg-native' in '/Users/raimonfuns/projects/webpack-electron-main-demo/node_modules/pg/lib/native'\n @ ./node_modules/pg/lib/native/index.js 2:0-36\n @ ./node_modules/pg/lib/index.js 27:26-45 38:24-43\n @ ./node_modules/sushitrain/index.js 13:0-36\n @ ./node_modules/prs-atm/index.js 8:0-38\n @ ./prs-atm.js 1:15-33\n\nwebpack 5.11.1 compiled with 1 error and 13 warnings in 67762 ms\nerror Command failed with exit code 1.\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleask%2Fwebpack-electron-main-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleask%2Fwebpack-electron-main-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleask%2Fwebpack-electron-main-demo/lists"}