{"id":21146362,"url":"https://github.com/bhallstein/sequelize-bundling-issue","last_synced_at":"2025-07-19T09:36:29.967Z","repository":{"id":143863508,"uuid":"590530453","full_name":"bhallstein/sequelize-bundling-issue","owner":"bhallstein","description":"Replication of sequelize import issue causing bundling issues in rollup \u0026 webpack","archived":false,"fork":false,"pushed_at":"2023-01-18T16:33:07.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"int","last_synced_at":"2025-03-14T13:44:18.325Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"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/bhallstein.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":"2023-01-18T16:18:53.000Z","updated_at":"2023-01-18T16:19:46.000Z","dependencies_parsed_at":"2024-07-23T20:06:33.294Z","dependency_job_id":null,"html_url":"https://github.com/bhallstein/sequelize-bundling-issue","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bhallstein/sequelize-bundling-issue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhallstein%2Fsequelize-bundling-issue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhallstein%2Fsequelize-bundling-issue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhallstein%2Fsequelize-bundling-issue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhallstein%2Fsequelize-bundling-issue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhallstein","download_url":"https://codeload.github.com/bhallstein/sequelize-bundling-issue/tar.gz/refs/heads/int","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhallstein%2Fsequelize-bundling-issue/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265910150,"owners_count":23847517,"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-11-20T08:53:12.003Z","updated_at":"2025-07-19T09:36:29.944Z","avatar_url":"https://github.com/bhallstein.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sequelize bundling issue replication\n\nBundling an app that imports Sequelize may fail due to Sequelize's current practice of importing dependencies for multiple DB drivers, even though some of these will not normally be installed (as an individual app will likely use only one DB type).\n\nAlternatively bundling may succeed, but produce a bundle which when executed causes a hard error when it tries to import the non-installed module(s).\n\n### How to replicate:\n\n```sh\nnpm install\nnpm run build\nnode dist/app.js\n```\n\n*Sample output from running bundled app.js*:\n```\n$ node dist/app.js\nnode:internal/errors:490\n    ErrorCaptureStackTrace(err);\n    ^\n\nError [ERR_MODULE_NOT_FOUND]: Cannot find package 'pg-hstore' imported from /Users/ben/Desktop/sequelize-bundling-issue/dist/app.js\n    at new NodeError (node:internal/errors:399:5)\n    at packageResolve (node:internal/modules/esm/resolve:794:9)\n    at moduleResolve (node:internal/modules/esm/resolve:843:20)\n    at defaultResolve (node:internal/modules/esm/resolve:1058:11)\n    at nextResolve (node:internal/modules/esm/loader:164:28)\n    at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)\n    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:419:18)\n    at ModuleWrap.\u003canonymous\u003e (node:internal/modules/esm/module_job:77:40)\n    at link (node:internal/modules/esm/module_job:76:36) {\n  code: 'ERR_MODULE_NOT_FOUND'\n}\n\nNode.js v19.4.0\n```\n\n\n### Links to relevant issues:\n\n- https://github.com/sequelize/sequelize/issues/7509 (closed in 2017 then re-opened by popular demand)\n  - [Comment suggesting init improvement](https://github.com/sequelize/sequelize/issues/7509#issuecomment-754345526)\n- https://github.com/sequelize/sequelize/issues/13169 (closed, demo repo requested to re-open)\n- https://github.com/sequelize/sequelize/issues/9489\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhallstein%2Fsequelize-bundling-issue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhallstein%2Fsequelize-bundling-issue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhallstein%2Fsequelize-bundling-issue/lists"}